diff --git a/src/components/CompetitionPage/CompetitionPage.tsx b/src/components/CompetitionPage/CompetitionPage.tsx index 62db4166..ee6171a8 100644 --- a/src/components/CompetitionPage/CompetitionPage.tsx +++ b/src/components/CompetitionPage/CompetitionPage.tsx @@ -16,15 +16,7 @@ type CompetitionPageProps = { } export const CompetitionPage: FC = ({ - competition: { - id, - name, - who_can_participate, - description, - upcoming_or_current_event, - competition_type, - history_events, - }, + competition: {id, name, who_can_participate, description, upcoming_or_current_event, history_events}, }) => { const {setBannerMessages} = BannerContainer.useContainer() @@ -48,11 +40,17 @@ export const CompetitionPage: FC = ({ return ( - {who_can_participate && Súťaž je určená pre {who_can_participate}} + + {who_can_participate && `Súťaž je určená pre ${who_can_participate}.`} + {description && ` ${description}`} + - {description && {description}} - - + Pravidlá @@ -73,7 +71,7 @@ export const CompetitionPage: FC = ({ )} {upcoming_or_current_event.publication_set.length > 0 && ( - + Pozvánka @@ -81,15 +79,15 @@ export const CompetitionPage: FC = ({ )} {upcoming_or_current_event.registration_link && ( <> + {upcoming_or_current_event.registration_link.additional_info} Registrácia prebieha do: {formatDateTime(upcoming_or_current_event.registration_link.end)} - + Registračný formulár - {upcoming_or_current_event.registration_link.additional_info} )} @@ -99,36 +97,32 @@ export const CompetitionPage: FC = ({ )} - Archív {/* TODO: asi zjednotit styly, neriesit with/without publications */} - {competition_type?.name === 'Tábor' ? ( - - {history_events.map((event) => ( - - {name + ' '} {event.school_year} + + + {history_events.map((event) => ( + + + {name} {event.school_year} - ))} - - ) : ( - - {history_events.map((event) => ( - - - {name} {event.school_year} - - - {event.publication_set.map((publication) => ( - - {publication.name} - - ))} - + + {event.publication_set.map((publication) => ( + + {publication.name} + + ))} - ))} - - )} + + ))} + )