Skip to content

Commit

Permalink
Unnecessary function removed
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrands02 committed Jul 15, 2024
1 parent 389877e commit 92d472c
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,6 @@ export const PublicationsDetailTemplate: React.FC<PublicationsDetailTemplateProp

const [isMetaDataVisible, setMetaDataIsVisible] = React.useState(false);

const toggleMetaDataVisibility = () => {
setMetaDataIsVisible(!isMetaDataVisible);
};

const imageHasValidSource = (src: string): boolean => {
try {
const url = new URL(src);
Expand Down Expand Up @@ -424,7 +420,7 @@ export const PublicationsDetailTemplate: React.FC<PublicationsDetailTemplateProp

{_getPublication.data?.metaData &&
<div>
<Button onClick={toggleMetaDataVisibility}>
<Button onClick={() => {setMetaDataIsVisible(!isMetaDataVisible)}}>
<FontAwesomeIcon icon={isMetaDataVisible ? faMinus : faArrowDown } />
{isMetaDataVisible ? t("Hide metadata") : t("Show metadata")}
</Button>
Expand Down

0 comments on commit 92d472c

Please sign in to comment.