From 7f0d00a1e5051a045320e554456514ef07a5c031 Mon Sep 17 00:00:00 2001 From: matushl Date: Sun, 15 Dec 2024 12:29:37 +0100 Subject: [PATCH] Polish some code style --- .../SemesterAdministration.tsx | 55 +++++++++---------- 1 file changed, 26 insertions(+), 29 deletions(-) diff --git a/src/components/SemesterAdministration/SemesterAdministration.tsx b/src/components/SemesterAdministration/SemesterAdministration.tsx index bc75d182..6018e455 100644 --- a/src/components/SemesterAdministration/SemesterAdministration.tsx +++ b/src/components/SemesterAdministration/SemesterAdministration.tsx @@ -11,7 +11,6 @@ import {formatDateTime} from '@/utils/formatDate' import {useDataFromURL} from '@/utils/useDataFromURL' import {useHasPermissions} from '@/utils/useHasPermissions' -import {ProblemEdit} from '../Admin/resources/competition/problems/ProblemEdit' import {Loading} from '../Loading/Loading' import {PublicationUploader} from '../PublicationUploader/PublicationUploader' import {Result} from '../Results/ResultsRow' @@ -152,35 +151,33 @@ export const SemesterAdministration: FC = () => { - {series?.problems.map((problem) => { - return ( - - - - {problem.order}. úloha + {series?.problems.map((problem) => ( + + + + {problem.order}. úloha + + + + {problem.num_corrected_solutions === problem.num_solutions ? ( + <>{`Opravené (${problem.num_solutions})`} + ) : ( + <> + {problem.num_corrected_solutions}/{problem.num_solutions} + + )} + + + {problem.solution_pdf ? ( + + Vzorák - - - {problem.num_corrected_solutions === problem.num_solutions ? ( - <>{`Opravené (${problem.num_solutions})`} - ) : ( - <> - {problem.num_corrected_solutions}/{problem.num_solutions} - - )} - - - {problem.solution_pdf ? ( - - Vzorák - - ) : ( - <>{'chýba vzorák'} - )} - - - ) - })} + ) : ( + <>{'chýba vzorák'} + )} + + + ))} ))}