From 761846db73f895fbc3c547fe52ddd772f0c1ac1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Mih=C3=A1lik?= Date: Sun, 15 Dec 2024 00:46:35 +0100 Subject: [PATCH] Fix links to publications (#536) * Fix links to publications * Open files in new tab --- src/components/Archive/Archive.tsx | 15 +++++---------- .../CompetitionPage/CompetitionPage.tsx | 6 +++--- .../PublicationUploader/PublicationUploader.tsx | 2 +- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/components/Archive/Archive.tsx b/src/components/Archive/Archive.tsx index a91cdd35..525cb76a 100644 --- a/src/components/Archive/Archive.tsx +++ b/src/components/Archive/Archive.tsx @@ -20,12 +20,11 @@ type MyEvent = Omit & { } const PublicationButton: FC<{ - publicationId: number - publicationName: string -}> = ({publicationId, publicationName}) => { + publication: Publication +}> = ({publication}) => { return ( - - Časopis {publicationName} + + {publication.name} ) } @@ -79,11 +78,7 @@ export const Archive: FC = () => { {event.publication_set.map((publication) => ( - + ))} diff --git a/src/components/CompetitionPage/CompetitionPage.tsx b/src/components/CompetitionPage/CompetitionPage.tsx index b36a31d7..0f24cee8 100644 --- a/src/components/CompetitionPage/CompetitionPage.tsx +++ b/src/components/CompetitionPage/CompetitionPage.tsx @@ -94,19 +94,19 @@ export const CompetitionPage: FC = ({ {results && ( - + {PublicationTypes.RESULTS.display_name} )} {solutions ? ( - + {PublicationTypes.SOLUTIONS.display_name} ) : ( problems && ( - + {PublicationTypes.PROBLEMS.display_name} ) diff --git a/src/components/PublicationUploader/PublicationUploader.tsx b/src/components/PublicationUploader/PublicationUploader.tsx index 93338c3c..206e2bf5 100644 --- a/src/components/PublicationUploader/PublicationUploader.tsx +++ b/src/components/PublicationUploader/PublicationUploader.tsx @@ -32,7 +32,7 @@ export const PublicationUploader: FC = ({semesterId, o {order}. Časopis: {publication && ( - + {publication.name} )}