From 0fa333c66d6356eb556cd75199ae8cc772ba857b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vikt=C3=B3ria=20Brezinov=C3=A1?= Date: Thu, 22 Aug 2024 19:44:38 +0200 Subject: [PATCH] fix eslint --- .../SemesterAdministration.tsx | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/components/SemesterAdministration/SemesterAdministration.tsx b/src/components/SemesterAdministration/SemesterAdministration.tsx index fc7c2808..244b0f45 100644 --- a/src/components/SemesterAdministration/SemesterAdministration.tsx +++ b/src/components/SemesterAdministration/SemesterAdministration.tsx @@ -1,20 +1,20 @@ -import {Stack, Typography} from '@mui/material' -import {useQuery} from '@tanstack/react-query' +import { Stack, Typography } from '@mui/material' +import { useQuery } from '@tanstack/react-query' import axios from 'axios' -import {FC, useState} from 'react' - -import {Button} from '@/components/Clickable/Button' -import {Link} from '@/components/Clickable/Link' -import {SemesterWithProblems} from '@/types/api/generated/competition' -import {formatDateTime} from '@/utils/formatDate' -import {useDataFromURL} from '@/utils/useDataFromURL' -import {useHasPermissions} from '@/utils/useHasPermissions' - -import {Loading} from '../Loading/Loading' -import {PublicationUploader} from '../PublicationUploader/PublicationUploader' -import {Result} from '../Results/ResultsRow' +import { FC, useState } from 'react' + +import { Button } from '@/components/Clickable/Button' +import { Link } from '@/components/Clickable/Link' +import { SemesterWithProblems } from '@/types/api/generated/competition' +import { formatDateTime } from '@/utils/formatDate' +import { useDataFromURL } from '@/utils/useDataFromURL' +import { useHasPermissions } from '@/utils/useHasPermissions' + +import { Loading } from '../Loading/Loading' +import { PublicationUploader } from '../PublicationUploader/PublicationUploader' +import { Result } from '../Results/ResultsRow' import styles from './SemesterAdministration.module.scss' -import {SecurityUpdateSharp} from '@mui/icons-material' +import { SecurityUpdateSharp } from '@mui/icons-material' interface PostalCard { code: number @@ -28,13 +28,13 @@ interface PostalCard { export const SemesterAdministration: FC = () => { const { - id: {semesterId}, + id: { semesterId }, loading: urlDataLoading, } = useDataFromURL() - const {hasPermissions, permissionsIsLoading} = useHasPermissions() + const { hasPermissions, permissionsIsLoading } = useHasPermissions() - const {data: semesterData, isLoading: semesterIsLoading} = useQuery({ + const { data: semesterData, isLoading: semesterIsLoading } = useQuery({ queryKey: ['competition', 'semester', semesterId], queryFn: () => axios.get(`/api/competition/semester/${semesterId}`), // router.query.params su v prvom renderi undefined, tak pustime query az so spravnym semesterId @@ -46,7 +46,7 @@ export const SemesterAdministration: FC = () => { const getResults = async (seriesId: number | null) => { const isSemester = seriesId === null - const {data} = await axios.get( + const { data } = await axios.get( isSemester ? `/api/competition/semester/${semesterId}/results` : `/api/competition/series/${seriesId}/results`, ) setTextareaContent( @@ -75,7 +75,7 @@ export const SemesterAdministration: FC = () => { } const getPostalCards = async (offline_only: boolean) => { - const {data} = await axios.get( + const { data } = await axios.get( `/api/competition/semester/${semesterId}/${offline_only ? 'offline-schools' : 'schools'}`, ) setTextareaContent( @@ -109,7 +109,7 @@ export const SemesterAdministration: FC = () => { {semester.series_set.map((series) => ( - + {series.order}. séria @@ -190,7 +190,7 @@ export const SemesterAdministration: FC = () => { )} - + Nahrávanie časopisov {[1, 2, 3].map((order) => (