Skip to content

Commit

Permalink
Polish some code style
Browse files Browse the repository at this point in the history
  • Loading branch information
Matushl committed Dec 15, 2024
1 parent 351bd93 commit 7f0d00a
Showing 1 changed file with 26 additions and 29 deletions.
55 changes: 26 additions & 29 deletions src/components/SemesterAdministration/SemesterAdministration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -152,35 +151,33 @@ export const SemesterAdministration: FC = () => {
</Typography>
</Stack>
<Grid container spacing={2} xs={12} md={9}>
{series?.problems.map((problem) => {
return (
<Fragment key={problem.id}>
<Grid xs={4}>
<Link key={problem.id} variant="button2" href={`/${seminar}/admin/opravit-ulohu/${problem.id}`}>
{problem.order}. úloha
{series?.problems.map((problem) => (
<Fragment key={problem.id}>
<Grid xs={4}>
<Link key={problem.id} variant="button2" href={`/${seminar}/admin/opravit-ulohu/${problem.id}`}>
{problem.order}. úloha
</Link>
</Grid>
<Grid xs={4} textAlign="center">
{problem.num_corrected_solutions === problem.num_solutions ? (
<>{`Opravené (${problem.num_solutions})`}</>
) : (
<>
{problem.num_corrected_solutions}/{problem.num_solutions}
</>
)}
</Grid>
<Grid xs={4} textAlign="center">
{problem.solution_pdf ? (
<Link key={problem.id} variant="button2" href={problem.solution_pdf}>
Vzorák
</Link>
</Grid>
<Grid xs={4} textAlign="center">
{problem.num_corrected_solutions === problem.num_solutions ? (
<>{`Opravené (${problem.num_solutions})`}</>
) : (
<>
{problem.num_corrected_solutions}/{problem.num_solutions}
</>
)}
</Grid>
<Grid xs={4} textAlign="center">
{problem.solution_pdf ? (
<Link key={problem.id} variant="button2" href={problem.solution_pdf}>
Vzorák
</Link>
) : (
<>{'chýba vzorák'}</>
)}
</Grid>
</Fragment>
)
})}
) : (
<>{'chýba vzorák'}</>
)}
</Grid>
</Fragment>
))}
</Grid>
</Stack>
))}
Expand Down

0 comments on commit 7f0d00a

Please sign in to comment.