Skip to content

Commit

Permalink
feat: toujours afficher le bouton ajout vignette quand il n'y en a pa…
Browse files Browse the repository at this point in the history
…s encore #525
  • Loading branch information
ocruze committed Oct 25, 2024
1 parent fcfacfa commit 2e59e6c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { fr } from "@codegouvfr/react-dsfr";
import Alert from "@codegouvfr/react-dsfr/Alert";
import Button from "@codegouvfr/react-dsfr/Button";
import { createModal, ModalProps } from "@codegouvfr/react-dsfr/Modal";
import { cx } from "@codegouvfr/react-dsfr/tools/cx";
import { Upload } from "@codegouvfr/react-dsfr/Upload";
import { yupResolver } from "@hookform/resolvers/yup";
import { useMutation, useQueryClient } from "@tanstack/react-query";
Expand All @@ -23,7 +24,6 @@ import api from "../../../api";

import "../../../../sass/components/buttons.scss";

import { cx } from "@codegouvfr/react-dsfr/tools/cx";
import placeholder1x1 from "../../../../img/placeholder.1x1.png";

const addThumbnailModal = createModal({
Expand Down Expand Up @@ -209,7 +209,7 @@ const DatasheetThumbnail: FC<DatasheetThumbnailProps> = ({ datastoreId, datashee
loading="lazy"
src={datasheet?.thumbnail?.url === undefined ? placeholder1x1 : datasheet?.thumbnail?.url}
/>
{thumbnailIsHovered && (
{(datasheet?.thumbnail?._id === undefined || thumbnailIsHovered) && (
<div className="frx-btn--hover-icon">
<Button
title={t("thumbnail_action", { action: action })}
Expand Down

0 comments on commit 2e59e6c

Please sign in to comment.