Skip to content

Commit

Permalink
chore: petits changements visuels
Browse files Browse the repository at this point in the history
  • Loading branch information
ocruze committed Apr 25, 2024
1 parent 9b043d8 commit a6d6f38
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,13 @@ const DatasheetView: FC<DatasheetViewProps> = ({ datastoreId, datasheetName }) =
size="large"
/>
<h1 className={fr.cx("fr-m-0")}>{datasheetName}</h1>
<Badge noIcon={true} severity="info" className={fr.cx("fr-ml-2w")}>
<Badge noIcon={true} severity="info" className={fr.cx("fr-mx-2w")}>
{(datasheetQuery?.data?.nb_publications && datasheetQuery?.data?.nb_publications > 0) ||
datasheetQuery.data?.metadata_published === true
? tCommon("published")
: tCommon("not_published")}
</Badge>
{(datasheetQuery.isFetching || metadataQuery.isFetching) && <LoadingIcon largeIcon={true} />}
</div>

<div className={fr.cx("fr-grid-row", "fr-mb-4w")}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@ const MetadataField: FC<MetadataFieldProps> = ({ title, content: value, hintText
{hintText && <p className={fr.cx("fr-m-0", "fr-text--sm", "fr-text--light")}>{hintText}</p>}

{markdown && typeof value === "string" ? (
<MDEditor.Markdown className={fr.cx()} source={value} style={customStyle} />
<MDEditor.Markdown
className={fr.cx()}
source={value}
style={customStyle}
components={{
a: (props) => <a target="_blank" rel="noreferrer" {...props} />,
}}
/>
) : typeof value === "string" ? (
<p className={fr.cx("fr-m-0")}>{value}</p>
) : (
Expand Down

0 comments on commit a6d6f38

Please sign in to comment.