From d606a0c3d9a72b0a907369a1f8363de8c477a72d Mon Sep 17 00:00:00 2001 From: Thibault Guillou Date: Tue, 17 Dec 2024 14:56:33 +0100 Subject: [PATCH] typescript error --- src/api/statistics/statistics.get.ts | 4 +- src/components/Avatar.tsx | 5 +- src/components/Base.tsx | 3 +- .../FinalStep/ImageStepContainer.tsx | 3 +- src/components/H5pOLD.tsx | 3 +- src/components/Header.tsx | 7 +- src/components/LanguageFilter.tsx | 3 +- src/components/Map/Map.tsx | 1 + src/components/Modal.tsx | 3 +- src/components/Navigation.tsx | 5 +- src/components/NavigationMobile.tsx | 3 +- src/components/PageLayout.tsx | 3 +- .../PaginationNav/PaginationNav.tsx | 3 +- src/components/SearchField.tsx | 3 +- src/components/Steps.tsx | 5 +- src/components/StepsButtons.tsx | 5 +- .../SuggestionCarousel/SuggestionCarousel.tsx | 7 +- src/components/VideoTable.tsx | 3 +- src/components/VillageMonde.tsx | 3 +- src/components/VillageSelect.tsx | 3 +- src/components/WelcomeModal/FirstPhase.tsx | 5 +- src/components/WelcomeModal/SecondPhase.tsx | 3 +- src/components/WelcomeModal/ThirdPhase.tsx | 3 +- src/components/WorldMap/Popover.tsx | 3 +- src/components/WorldMap/WorldMap.tsx | 9 +- src/components/WorldMap/use-full-screen.tsx | 3 +- .../accueil/Filters/FilterSelect.tsx | 3 +- src/components/accueil/Filters/Filters.tsx | 3 +- src/components/accueil/LastActivities.tsx | 3 +- src/components/accueil/LinkChild.tsx | 3 +- src/components/accueil/NewHome.tsx | 3 +- .../accueil/PelicoProfilNavigation.tsx | 3 +- src/components/accueil/RightNavigation.tsx | 3 +- src/components/accueil/SubHeader.tsx | 3 +- src/components/accueil/VideoPresentation.tsx | 3 +- src/components/accueil/VillageComponent.tsx | 3 +- .../activities/ActivityCard/AnthemCard.tsx | 3 +- .../activities/ActivityCard/DefiCard.tsx | 3 +- .../activities/ActivityCard/EnigmeCard.tsx | 3 +- .../ActivityCard/FreeContentCard.tsx | 3 +- .../activities/ActivityCard/GameCard.tsx | 3 +- .../ActivityCard/GameCardMaClasse.tsx | 3 +- .../activities/ActivityCard/IndiceCard.tsx | 3 +- .../activities/ActivityCard/MascotteCard.tsx | 3 +- .../activities/ActivityCard/MimicCard.tsx | 3 +- .../ActivityCard/PresentationCard.tsx | 3 +- .../activities/ActivityCard/QuestionCard.tsx | 3 +- .../activities/ActivityCard/ReactionCard.tsx | 3 +- .../activities/ActivityCard/ReportageCard.tsx | 3 +- .../activities/ActivityCard/StoryCard.tsx | 3 +- .../activities/ActivityCard/SymbolCard.tsx | 3 +- .../ActivityCard/VerseRecordCard.tsx | 3 +- .../activity-admin/ActivityCardAdmin.tsx | 5 +- .../activity-admin/ActivityCardAdminList.tsx | 5 +- .../activity-admin/AllActivitiesAdmin.tsx | 5 +- .../activities/ActivityCard/index.tsx | 5 +- .../ActivityChoice/ActivityChoiceButton.tsx | 3 +- .../activities/ActivityChoice/index.tsx | 3 +- .../ActivityComments/AddComment.tsx | 3 +- .../ActivityComments/CommentCard.tsx | 3 +- src/components/activities/ActivitySelect.tsx | 3 +- .../ActivityView/DefiActivityView.tsx | 3 +- .../ActivityView/EnigmeActivityView.tsx | 3 +- .../ActivityView/MascotteActivityView.tsx | 3 +- .../ActivityView/StoriesDataCardView.tsx | 3 +- .../ActivityView/StoryActivityView.tsx | 5 +- src/components/activities/List.tsx | 5 +- .../anthem/AnthemTrack/AnthemTrack.tsx | 3 +- .../AnthemTrackIcon/AnthemTrackIcon.tsx | 3 +- .../activities/content/AddContentCard.tsx | 3 +- .../activities/content/MascotteTemplate.tsx | 5 +- .../editors/AudioEditor/AudioEditor.tsx | 5 +- .../editors/DocumentEditor/DocumentEditor.tsx | 3 +- .../editors/DocumentEditor/DocumentModal.tsx | 3 +- .../content/editors/EditorContainer.tsx | 3 +- .../activities/content/editors/H5pEditor.tsx | 5 +- .../editors/ImageEditor/AvatarEditor.tsx | 3 +- .../editors/ImageEditor/ImageEditor.tsx | 3 +- .../editors/ImageEditor/ImageModal.tsx | 7 +- .../content/editors/SoundEditor.tsx | 5 +- .../content/editors/SyllableEditor.tsx | 3 +- .../editors/TextEditor/SimpleTextEditor.tsx | 5 +- .../TextEditor/toolbar/ColorPicker.tsx | 3 +- .../TextEditor/toolbar/EmojiPicker.tsx | 3 +- .../TextEditor/toolbar/InlineButtons.tsx | 3 +- .../editors/TextEditor/toolbar/Link.tsx | 9 +- .../TextEditor/toolbar/TextAlignButtons.tsx | 3 +- .../TextEditor/toolbar/TitleChoice.tsx | 3 +- .../editors/VideoEditor/VideoEditor.tsx | 3 +- .../editors/VideoEditor/VideoModals.tsx | 9 +- .../activities/content/views/SoundView.tsx | 3 +- .../content/views/VideoView/VideoView.tsx | 3 +- src/components/admin/AdminHeader.tsx | 5 +- src/components/admin/AdminNavigation.tsx | 5 +- src/components/admin/AdminTable.tsx | 3 +- src/components/admin/AdminTile.tsx | 3 +- src/components/admin/NewAdminHeader.tsx | 3 +- src/components/admin/NewAdminNavigation.tsx | 3 +- src/components/admin/OneVillageTable.tsx | 3 +- src/components/admin/analytics/BarWidget.tsx | 3 +- src/components/admin/analytics/TimePicker.tsx | 3 +- .../dashboard-statistics/ClassroomStats.tsx | 3 +- .../dashboard-statistics/CountryStats.tsx | 10 +- .../DashboardStatsNav.tsx | 3 +- .../dashboard-statistics/GlobalStats.tsx | 3 +- .../admin/dashboard-statistics/TabPanel.tsx | 3 +- .../dashboard-statistics/TeamComments.tsx | 3 +- .../dashboard-statistics/VillageStats.tsx | 7 +- .../ClassesExchangesCard.tsx | 5 +- .../cards/CommentCard/CommentCard.tsx | 3 +- .../cards/StatsCard/StatsCard.tsx | 3 +- .../dashboard-statistics/charts/BarCharts.tsx | 3 +- .../charts/DashboardTable.tsx | 95 +++++++++---------- .../charts/HorizontalChart.tsx | 1 - .../dashboard-statistics/charts/PieCharts.tsx | 3 +- .../filters/ClassroomDropdown.tsx | 3 +- .../filters/CountriesDropdown.tsx | 3 +- .../dashboard-statistics/filters/Dropdown.tsx | 3 +- .../filters/PhaseDropdown.tsx | 3 +- .../filters/VillageDropdown.tsx | 3 +- .../DashboardWorldMap/DashboardWorldMap.tsx | 3 +- .../menu/PhaseDetails.tsx | 5 +- .../nav/DashboardTabs.tsx | 3 +- .../admin/mediatheque/CardMediatheque.tsx | 3 +- .../admin/mediatheque/CheckboxAdmin.tsx | 3 +- .../admin/mediatheque/DownloadButton.tsx | 9 +- src/components/admin/mediatheque/Filter.tsx | 3 +- .../admin/mediatheque/FiltersActivities.tsx | 5 +- .../admin/mediatheque/MediaCarousel.tsx | 3 +- .../admin/mediatheque/ModalFilter.tsx | 3 +- .../audio/AudioMixer/AudioMixer.tsx | 3 +- .../AudioMixerTrackControl.tsx | 3 +- .../audio/AudioPlayer/AudioPlayer.tsx | 3 +- src/components/audio/DraggableTrack.tsx | 3 +- .../audio/VolumeControls/VolumeControl.tsx | 5 +- src/components/buttons/AddAudioButton.tsx | 3 +- src/components/buttons/CustomRadio.tsx | 3 +- src/components/buttons/DeleteButton.tsx | 3 +- src/components/buttons/EditButton.tsx | 3 +- src/components/buttons/GameResponseButton.tsx | 3 +- src/components/buttons/HelpButton.tsx | 3 +- src/components/buttons/QuestionButton.tsx | 3 +- src/components/buttons/RedButton.tsx | 3 +- src/components/buttons/ThemeChoiceButton.tsx | 3 +- src/components/game/DisplayGameById.tsx | 5 +- src/components/game/List.tsx | 5 +- src/components/game/Play.tsx | 3 +- src/components/game/Previsualisation.tsx | 3 +- .../game/componentGameMapping/GameField.tsx | 3 +- .../game/componentGameMapping/GameMedia.tsx | 5 +- .../game/componentGameMapping/GameRadio.tsx | 3 +- .../game/componentGameMapping/GameSelect.tsx | 3 +- src/components/h5p/H5pEditor.tsx | 3 +- src/components/mon-compte/NotifCheckbox.tsx | 5 +- src/components/mon-compte/PanelInput.tsx | 3 +- src/components/selectors/CountrySelector.tsx | 3 +- src/components/selectors/LanguageSelector.tsx | 3 +- src/components/selectors/MimicSelector.tsx | 3 +- .../selectors/MultipleCountrySelector.tsx | 3 +- .../selectors/MultipleCurrencySelector.tsx | 3 +- .../selectors/MultipleLanguageSelector.tsx | 3 +- .../storyPictureWheel/storyPictureWheel.tsx | 5 +- src/components/table/CollapsibleTable.tsx | 5 +- src/contexts/activityContext.tsx | 3 +- src/contexts/classroomContext.tsx | 3 +- src/contexts/villageContext.tsx | 9 +- src/pages/404.tsx | 3 +- src/pages/_app.tsx | 7 +- src/pages/_error.tsx | 3 +- src/pages/activite/[id].tsx | 3 +- src/pages/admin/analytics.tsx | 5 +- src/pages/admin/featureFlag.tsx | 7 +- src/pages/admin/h5p/edit/[id].tsx | 7 +- src/pages/admin/h5p/index.tsx | 11 ++- src/pages/admin/h5p/new.tsx | 7 +- .../admin/newportal/contenulibre/2/index.tsx | 3 +- .../admin/newportal/contenulibre/3/index.tsx | 7 +- .../contenulibre/edit/2/[id]/index.tsx | 3 +- .../contenulibre/edit/3/[id]/index.tsx | 7 +- src/pages/admin/newportal/create/index.tsx | 3 +- .../newportal/create/parametrer-hymne/1.tsx | 5 +- .../newportal/create/parametrer-hymne/2.tsx | 5 +- .../newportal/create/parametrer-hymne/3.tsx | 3 +- .../newportal/create/parametrer-hymne/4.tsx | 3 +- .../newportal/create/parametrer-hymne/5.tsx | 7 +- .../create/parametrer-hymne/index.tsx | 3 +- .../create/parametrer-hymne/success.tsx | 3 +- src/pages/admin/newportal/h5p/edit/[id].tsx | 7 +- src/pages/admin/newportal/h5p/index.tsx | 9 +- src/pages/admin/newportal/h5p/new.tsx | 7 +- src/pages/admin/newportal/index.tsx | 3 +- .../admin/newportal/manage/access/index.tsx | 9 +- src/pages/admin/newportal/manage/index.tsx | 3 +- .../manage/settings/archive/index.tsx | 3 +- .../admin/newportal/manage/settings/index.tsx | 3 +- .../manage/settings/pelico/index.tsx | 3 +- .../manage/settings/phases/index.tsx | 3 +- .../newportal/manage/users/edit/[id].tsx | 9 +- .../admin/newportal/manage/users/index.tsx | 7 +- .../admin/newportal/manage/users/new.tsx | 9 +- .../newportal/manage/villages/edit/[id].tsx | 7 +- .../admin/newportal/manage/villages/index.tsx | 7 +- .../admin/newportal/manage/villages/new.tsx | 7 +- .../admin/newportal/medialibrary/index.tsx | 3 +- .../admin/newportal/publier/draft/index.tsx | 3 +- src/pages/admin/newportal/publier/index.tsx | 5 +- .../newportal/publier/prepublish/[id].tsx | 11 ++- .../publier/prepublish/edit/[id].tsx | 11 ++- src/pages/admin/newportal/publish/index.tsx | 5 +- src/pages/admin/stats.tsx | 3 +- src/pages/admin/users/edit/[id].tsx | 9 +- src/pages/admin/users/index.tsx | 7 +- src/pages/admin/users/new.tsx | 9 +- src/pages/admin/villages/edit/[id].tsx | 7 +- src/pages/admin/villages/index.tsx | 7 +- src/pages/admin/villages/new.tsx | 7 +- src/pages/chanter-un-couplet/1.tsx | 5 +- src/pages/chanter-un-couplet/4.tsx | 5 +- src/pages/chanter-un-couplet/5.tsx | 7 +- src/pages/chanter-un-couplet/success.tsx | 3 +- src/pages/connexion.tsx | 5 +- src/pages/contenu-libre/2.tsx | 3 +- src/pages/contenu-libre/3.tsx | 7 +- src/pages/contenu-libre/success.tsx | 3 +- src/pages/creer-un-jeu/expression/5.tsx | 3 +- src/pages/creer-un-jeu/expression/index.tsx | 5 +- src/pages/creer-un-jeu/mimique/4.tsx | 3 +- src/pages/creer-un-jeu/mimique/index.tsx | 5 +- src/pages/creer-un-jeu/objet/5.tsx | 3 +- src/pages/creer-un-jeu/objet/index.tsx | 5 +- src/pages/creer-une-enigme/1.tsx | 3 +- src/pages/creer-une-enigme/4.tsx | 9 +- src/pages/creer-une-enigme/success.tsx | 3 +- src/pages/creer-une-histoire/1.tsx | 5 +- src/pages/creer-une-histoire/2.tsx | 5 +- src/pages/creer-une-histoire/3.tsx | 5 +- src/pages/creer-une-histoire/4.tsx | 5 +- src/pages/creer-une-histoire/5.tsx | 3 +- src/pages/creer-une-histoire/index.tsx | 3 +- src/pages/creer-une-histoire/success.tsx | 3 +- src/pages/familles/1.tsx | 3 +- src/pages/familles/2.tsx | 5 +- src/pages/familles/3.tsx | 3 +- src/pages/indice-culturel/1.tsx | 3 +- src/pages/indice-culturel/2.tsx | 3 +- src/pages/indice-culturel/3.tsx | 9 +- src/pages/indice-culturel/index.tsx | 3 +- src/pages/indice-culturel/success.tsx | 3 +- src/pages/inscription.tsx | 5 +- src/pages/lancer-un-defi/1.tsx | 3 +- src/pages/lancer-un-defi/3.tsx | 3 +- src/pages/lancer-un-defi/4.tsx | 9 +- src/pages/lancer-un-defi/culinaire/1.tsx | 5 +- src/pages/lancer-un-defi/culinaire/3.tsx | 3 +- src/pages/lancer-un-defi/culinaire/4.tsx | 11 ++- src/pages/lancer-un-defi/ecologique/3.tsx | 3 +- src/pages/lancer-un-defi/ecologique/4.tsx | 9 +- src/pages/lancer-un-defi/linguistique/1.tsx | 3 +- src/pages/lancer-un-defi/linguistique/2.tsx | 3 +- src/pages/lancer-un-defi/linguistique/4.tsx | 3 +- src/pages/lancer-un-defi/linguistique/5.tsx | 9 +- src/pages/lancer-un-defi/success.tsx | 3 +- src/pages/login.tsx | 3 +- src/pages/mascotte/1.tsx | 3 +- src/pages/mascotte/2.tsx | 3 +- src/pages/mascotte/3.tsx | 3 +- src/pages/mascotte/4.tsx | 3 +- src/pages/mascotte/5.tsx | 5 +- src/pages/mes-videos.tsx | 8 -- src/pages/mon-compte.tsx | 5 +- src/pages/parametrer-hymne/1.tsx | 5 +- src/pages/parametrer-hymne/2.tsx | 5 +- src/pages/parametrer-hymne/3.tsx | 3 +- src/pages/parametrer-hymne/4.tsx | 3 +- src/pages/parametrer-hymne/5.tsx | 7 +- src/pages/parametrer-hymne/success.tsx | 3 +- src/pages/pelico-profil.tsx | 3 +- src/pages/poser-une-question/1.tsx | 3 +- src/pages/poser-une-question/2.tsx | 5 +- src/pages/poser-une-question/3.tsx | 9 +- src/pages/poser-une-question/success.tsx | 3 +- src/pages/re-inventer-une-histoire/1.tsx | 5 +- src/pages/re-inventer-une-histoire/2.tsx | 5 +- src/pages/re-inventer-une-histoire/3.tsx | 5 +- src/pages/re-inventer-une-histoire/4.tsx | 5 +- src/pages/re-inventer-une-histoire/5.tsx | 3 +- .../re-inventer-une-histoire/success.tsx | 3 +- src/pages/reagir-a-une-activite/3.tsx | 9 +- src/pages/reagir-a-une-activite/success.tsx | 3 +- src/pages/realiser-un-reportage/1.tsx | 3 +- src/pages/realiser-un-reportage/3.tsx | 9 +- src/pages/realiser-un-reportage/success.tsx | 3 +- src/pages/reset-password.tsx | 3 +- src/pages/se-presenter/success.tsx | 3 +- src/pages/se-presenter/thematique/4.tsx | 7 +- src/pages/symbole/1.tsx | 3 +- src/pages/symbole/3.tsx | 9 +- src/pages/symbole/success.tsx | 3 +- src/pages/update-password.tsx | 5 +- src/pages/user-verified.tsx | 3 +- 300 files changed, 822 insertions(+), 543 deletions(-) diff --git a/src/api/statistics/statistics.get.ts b/src/api/statistics/statistics.get.ts index 312b909b0..4c352a418 100644 --- a/src/api/statistics/statistics.get.ts +++ b/src/api/statistics/statistics.get.ts @@ -33,8 +33,8 @@ async function getVillagesStats(villageId: number | null, phase: number): Promis ).data; } -export const useGetSessionsStats = () => { - return useQuery(['sessions-stats'], () => getSessionsStats()); +export const useGetSessionsStats = (phase: number | null) => { + return useQuery(['sessions-stats'], () => getSessionsStats(phase)); }; export const useGetOneVillageStats = () => { return useQuery(['1v-stats'], () => getOneVillageStats()); diff --git a/src/components/Avatar.tsx b/src/components/Avatar.tsx index d7ba42c74..487f2449e 100644 --- a/src/components/Avatar.tsx +++ b/src/components/Avatar.tsx @@ -1,8 +1,9 @@ -import PersonIcon from '@mui/icons-material/Person'; -import { Avatar, Tooltip } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import PersonIcon from '@mui/icons-material/Person'; +import { Avatar, Tooltip } from '@mui/material'; + import { bgPage } from 'src/styles/variables.const'; import PelicoSouriant from 'src/svg/pelico/pelico-souriant.svg'; import { getGravatarUrl } from 'src/utils'; diff --git a/src/components/Base.tsx b/src/components/Base.tsx index c786e7da4..b62afb48d 100644 --- a/src/components/Base.tsx +++ b/src/components/Base.tsx @@ -1,6 +1,7 @@ -import { Box, Grid } from '@mui/material'; import React from 'react'; +import { Box, Grid } from '@mui/material'; + import { Navigation } from './Navigation'; import { NavigationMobile } from './NavigationMobile'; import { SubHeaders } from 'src/components/accueil/SubHeader'; diff --git a/src/components/FinalStep/ImageStepContainer.tsx b/src/components/FinalStep/ImageStepContainer.tsx index bbcf54270..3c081ec95 100644 --- a/src/components/FinalStep/ImageStepContainer.tsx +++ b/src/components/FinalStep/ImageStepContainer.tsx @@ -1,9 +1,10 @@ -import { Grid, ButtonBase } from '@mui/material'; import classNames from 'classnames'; import Image from 'next/image'; import router from 'next/router'; import React from 'react'; +import { Grid, ButtonBase } from '@mui/material'; + import { KeepRatio } from '../KeepRatio'; import { EditButton } from '../buttons/EditButton'; import { bgPage, primaryColor, warningColor } from 'src/styles/variables.const'; diff --git a/src/components/H5pOLD.tsx b/src/components/H5pOLD.tsx index e6535dec2..9df527d6b 100644 --- a/src/components/H5pOLD.tsx +++ b/src/components/H5pOLD.tsx @@ -1,6 +1,7 @@ -import CircularProgress from '@mui/material/CircularProgress'; import React from 'react'; +import CircularProgress from '@mui/material/CircularProgress'; + import { bgPage } from 'src/styles/variables.const'; interface H5pProps { diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 7d0d28456..ee97a52e1 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -1,11 +1,12 @@ +import Link from 'next/link'; +import { useRouter } from 'next/router'; +import React from 'react'; + import SettingsIcon from '@mui/icons-material/Settings'; import { Box } from '@mui/material'; import IconButton from '@mui/material/IconButton'; import Menu from '@mui/material/Menu'; import MenuItem from '@mui/material/MenuItem'; -import Link from 'next/link'; -import { useRouter } from 'next/router'; -import React from 'react'; import AccessControl from './AccessControl'; import { VillageSelect } from './VillageSelect'; diff --git a/src/components/LanguageFilter.tsx b/src/components/LanguageFilter.tsx index a0095edc2..726e4f912 100644 --- a/src/components/LanguageFilter.tsx +++ b/src/components/LanguageFilter.tsx @@ -1,6 +1,7 @@ +import React from 'react'; + import type { SxProps, Theme } from '@mui/material'; import { Autocomplete, TextField } from '@mui/material'; -import React from 'react'; import type { Language } from 'types/language.type'; diff --git a/src/components/Map/Map.tsx b/src/components/Map/Map.tsx index 5dd977f17..b99e5aead 100644 --- a/src/components/Map/Map.tsx +++ b/src/components/Map/Map.tsx @@ -5,6 +5,7 @@ import {} from 'leaflet.fullscreen'; import maplibregl from 'maplibre-gl'; import { useRouter } from 'next/router'; import React from 'react'; + // eslint-disable-next-line import/order import { Tooltip } from '@mui/material'; diff --git a/src/components/Modal.tsx b/src/components/Modal.tsx index 0d3283dd1..794dad9e6 100644 --- a/src/components/Modal.tsx +++ b/src/components/Modal.tsx @@ -1,3 +1,5 @@ +import React from 'react'; + import CloseIcon from '@mui/icons-material/Close'; import { CircularProgress } from '@mui/material'; import Box from '@mui/material/Box'; @@ -10,7 +12,6 @@ import IconButton from '@mui/material/IconButton'; import type { LinearProgressProps } from '@mui/material/LinearProgress'; import LinearProgress from '@mui/material/LinearProgress'; import Typography from '@mui/material/Typography'; -import React from 'react'; import { RedButton } from 'src/components/buttons/RedButton'; import { bgPage } from 'src/styles/variables.const'; diff --git a/src/components/Navigation.tsx b/src/components/Navigation.tsx index 22a5f4296..6118b06aa 100644 --- a/src/components/Navigation.tsx +++ b/src/components/Navigation.tsx @@ -1,9 +1,10 @@ -import { Box, Button } from '@mui/material'; -import Switch from '@mui/material/Switch'; import Link from 'next/link'; import { useRouter } from 'next/router'; import * as React from 'react'; +import { Box, Button } from '@mui/material'; +import Switch from '@mui/material/Switch'; + import { AvatarImg } from './Avatar'; import { VillageMonde } from './VillageMonde'; import { Modal } from 'src/components/Modal'; diff --git a/src/components/NavigationMobile.tsx b/src/components/NavigationMobile.tsx index eb55bf156..7fc22b9ef 100644 --- a/src/components/NavigationMobile.tsx +++ b/src/components/NavigationMobile.tsx @@ -1,3 +1,5 @@ +import React, { useState } from 'react'; + import CloseIcon from '@mui/icons-material/Close'; import MenuIcon from '@mui/icons-material/Menu'; import Box from '@mui/material/Box'; @@ -5,7 +7,6 @@ import Divider from '@mui/material/Divider'; import Drawer from '@mui/material/Drawer'; import Grid from '@mui/material/Grid'; import IconButton from '@mui/material/IconButton'; -import React, { useState } from 'react'; import { Navigation } from './Navigation'; import ShowFor from './ShowFor'; diff --git a/src/components/PageLayout.tsx b/src/components/PageLayout.tsx index 9bffbba0b..30b44b6ea 100644 --- a/src/components/PageLayout.tsx +++ b/src/components/PageLayout.tsx @@ -1,6 +1,7 @@ -import { Box } from '@mui/material'; import React from 'react'; +import { Box } from '@mui/material'; + type PageLayoutProps = { children: React.ReactNode; }; diff --git a/src/components/PaginationNav/PaginationNav.tsx b/src/components/PaginationNav/PaginationNav.tsx index 95f1be6c2..1b529fe22 100644 --- a/src/components/PaginationNav/PaginationNav.tsx +++ b/src/components/PaginationNav/PaginationNav.tsx @@ -1,6 +1,7 @@ +import React from 'react'; + import type { SelectChangeEvent } from '@mui/material'; import { Box, InputLabel, MenuItem, Pagination, Select } from '@mui/material'; -import React from 'react'; interface PaginationNavProps { page: number; diff --git a/src/components/SearchField.tsx b/src/components/SearchField.tsx index 4b15c319c..b7c0a5fc1 100644 --- a/src/components/SearchField.tsx +++ b/src/components/SearchField.tsx @@ -1,8 +1,9 @@ +import React from 'react'; + import SearchIcon from '@mui/icons-material/Search'; import InputBase from '@mui/material/InputBase'; import type { SxProps, Theme } from '@mui/material/styles'; import { styled } from '@mui/material/styles'; -import React from 'react'; const Search = styled('div')(({ theme }) => ({ position: 'relative', diff --git a/src/components/Steps.tsx b/src/components/Steps.tsx index 2c16f16c8..6463dc49f 100644 --- a/src/components/Steps.tsx +++ b/src/components/Steps.tsx @@ -1,8 +1,9 @@ +import { useRouter } from 'next/router'; +import React from 'react'; + import CheckIcon from '@mui/icons-material/Check'; import { Step, StepConnector, StepLabel, Stepper } from '@mui/material/'; import type { StepIconProps } from '@mui/material/StepIcon'; -import { useRouter } from 'next/router'; -import React from 'react'; import { ActivityContext } from 'src/contexts/activityContext'; import { primaryColor, primaryColorLight2, successColor, warningColor } from 'src/styles/variables.const'; diff --git a/src/components/StepsButtons.tsx b/src/components/StepsButtons.tsx index 66c7a6a72..7cc6decea 100644 --- a/src/components/StepsButtons.tsx +++ b/src/components/StepsButtons.tsx @@ -1,8 +1,9 @@ +import Link from 'next/link'; +import React from 'react'; + import ChevronLeftIcon from '@mui/icons-material/ChevronLeft'; import ChevronRightIcon from '@mui/icons-material/ChevronRight'; import { Box, Button } from '@mui/material'; -import Link from 'next/link'; -import React from 'react'; export interface StepsButtonProps { prev?: string | (() => void); diff --git a/src/components/SuggestionCarousel/SuggestionCarousel.tsx b/src/components/SuggestionCarousel/SuggestionCarousel.tsx index 519ea0542..1c3fe00e1 100644 --- a/src/components/SuggestionCarousel/SuggestionCarousel.tsx +++ b/src/components/SuggestionCarousel/SuggestionCarousel.tsx @@ -1,10 +1,11 @@ +import Image from 'next/image'; +import Link from 'next/link'; +import React from 'react'; + import { Button } from '@mui/material'; import Card from '@mui/material/Card'; import Tab from '@mui/material/Tab'; import Tabs from '@mui/material/Tabs'; -import Image from 'next/image'; -import Link from 'next/link'; -import React from 'react'; import { KeepRatio } from 'src/components/KeepRatio'; import { useResizeObserver } from 'src/hooks/useResizeObserver'; diff --git a/src/components/VideoTable.tsx b/src/components/VideoTable.tsx index 49ef4b176..b3457ba14 100644 --- a/src/components/VideoTable.tsx +++ b/src/components/VideoTable.tsx @@ -1,6 +1,7 @@ +import React from 'react'; + import VisibilityIcon from '@mui/icons-material/Visibility'; import { Table, TableBody, TableCell, TableHead, TableRow, Tooltip, IconButton } from '@mui/material'; -import React from 'react'; import { DeleteButton } from './buttons/DeleteButton'; import { bgPage } from 'src/styles/variables.const'; diff --git a/src/components/VillageMonde.tsx b/src/components/VillageMonde.tsx index 18fb0b6e6..52e12fd23 100644 --- a/src/components/VillageMonde.tsx +++ b/src/components/VillageMonde.tsx @@ -1,6 +1,7 @@ -import { Typography } from '@mui/material'; import * as React from 'react'; +import { Typography } from '@mui/material'; + import { Flag } from 'src/components/Flag'; import { ClassroomContext } from 'src/contexts/classroomContext'; import { UserContext } from 'src/contexts/userContext'; diff --git a/src/components/VillageSelect.tsx b/src/components/VillageSelect.tsx index a8073a278..3b3be733d 100644 --- a/src/components/VillageSelect.tsx +++ b/src/components/VillageSelect.tsx @@ -1,6 +1,7 @@ -import { Button, Grid } from '@mui/material'; import React from 'react'; +import { Button, Grid } from '@mui/material'; + import { UserContext } from 'src/contexts/userContext'; import { VillageContext } from 'src/contexts/villageContext'; import { secondaryColor } from 'src/styles/variables.const'; diff --git a/src/components/WelcomeModal/FirstPhase.tsx b/src/components/WelcomeModal/FirstPhase.tsx index d2b672883..2d26b741a 100644 --- a/src/components/WelcomeModal/FirstPhase.tsx +++ b/src/components/WelcomeModal/FirstPhase.tsx @@ -1,10 +1,11 @@ +import { useSnackbar } from 'notistack'; +import React from 'react'; + import KeyboardArrowLeft from '@mui/icons-material/KeyboardArrowLeft'; import KeyboardArrowRight from '@mui/icons-material/KeyboardArrowRight'; import { Checkbox, Typography } from '@mui/material'; import Button from '@mui/material/Button'; import MobileStepper from '@mui/material/MobileStepper'; -import { useSnackbar } from 'notistack'; -import React from 'react'; import { CGU } from 'src/components/CGU'; import { Flag } from 'src/components/Flag'; diff --git a/src/components/WelcomeModal/SecondPhase.tsx b/src/components/WelcomeModal/SecondPhase.tsx index a069c28ea..048deea0d 100644 --- a/src/components/WelcomeModal/SecondPhase.tsx +++ b/src/components/WelcomeModal/SecondPhase.tsx @@ -1,7 +1,8 @@ -import Button from '@mui/material/Button'; import { useSnackbar } from 'notistack'; import React from 'react'; +import Button from '@mui/material/Button'; + import { Modal } from 'src/components/Modal'; import { UserContext } from 'src/contexts/userContext'; import { VillageContext } from 'src/contexts/villageContext'; diff --git a/src/components/WelcomeModal/ThirdPhase.tsx b/src/components/WelcomeModal/ThirdPhase.tsx index 8b42a6038..bed4b7a82 100644 --- a/src/components/WelcomeModal/ThirdPhase.tsx +++ b/src/components/WelcomeModal/ThirdPhase.tsx @@ -1,7 +1,8 @@ -import Button from '@mui/material/Button'; import { useSnackbar } from 'notistack'; import React from 'react'; +import Button from '@mui/material/Button'; + import { Modal } from 'src/components/Modal'; import { UserContext } from 'src/contexts/userContext'; import { VillageContext } from 'src/contexts/villageContext'; diff --git a/src/components/WorldMap/Popover.tsx b/src/components/WorldMap/Popover.tsx index ad063987f..74cdfe97d 100644 --- a/src/components/WorldMap/Popover.tsx +++ b/src/components/WorldMap/Popover.tsx @@ -1,6 +1,7 @@ -import Card from '@mui/material/Card'; import * as React from 'react'; +import Card from '@mui/material/Card'; + import { UserPopover } from './UserPopover'; import type { User } from 'types/user.type'; diff --git a/src/components/WorldMap/WorldMap.tsx b/src/components/WorldMap/WorldMap.tsx index eb9ceb992..0f3d93a4b 100644 --- a/src/components/WorldMap/WorldMap.tsx +++ b/src/components/WorldMap/WorldMap.tsx @@ -1,9 +1,5 @@ import 'leaflet/dist/leaflet.css'; import 'maplibre-gl/dist/maplibre-gl.css'; -import AddIcon from '@mui/icons-material/Add'; -import CloseIcon from '@mui/icons-material/Close'; -import RemoveIcon from '@mui/icons-material/Remove'; -import { Button, ButtonGroup, IconButton, Typography } from '@mui/material'; import L from 'leaflet'; import {} from 'leaflet.fullscreen'; import { useRouter } from 'next/router'; @@ -11,6 +7,11 @@ import * as React from 'react'; import ReactDOM from 'react-dom'; import { useQuery } from 'react-query'; +import AddIcon from '@mui/icons-material/Add'; +import CloseIcon from '@mui/icons-material/Close'; +import RemoveIcon from '@mui/icons-material/Remove'; +import { Button, ButtonGroup, IconButton, Typography } from '@mui/material'; + import type { PopoverData } from './Popover'; import { isUser, Popover } from './Popover'; import { UserPopover } from './UserPopover'; diff --git a/src/components/WorldMap/use-full-screen.tsx b/src/components/WorldMap/use-full-screen.tsx index 48192dbdb..a5ad83622 100644 --- a/src/components/WorldMap/use-full-screen.tsx +++ b/src/components/WorldMap/use-full-screen.tsx @@ -1,8 +1,9 @@ +import * as React from 'react'; + import FullscreenIcon from '@mui/icons-material/Fullscreen'; import FullscreenExitIcon from '@mui/icons-material/FullscreenExit'; import Button from '@mui/material/Button'; import Tooltip from '@mui/material/Tooltip'; -import * as React from 'react'; export const useFullScreen = () => { const containerRef = React.useRef(null); diff --git a/src/components/accueil/Filters/FilterSelect.tsx b/src/components/accueil/Filters/FilterSelect.tsx index e0bae3ca7..f75eafdc0 100644 --- a/src/components/accueil/Filters/FilterSelect.tsx +++ b/src/components/accueil/Filters/FilterSelect.tsx @@ -1,10 +1,11 @@ +import React from 'react'; + import ExpandLessIcon from '@mui/icons-material/ExpandLess'; import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import Checkbox from '@mui/material/Checkbox'; import ClickAwayListener from '@mui/material/ClickAwayListener'; import FormControlLabel from '@mui/material/FormControlLabel'; import FormGroup from '@mui/material/FormGroup'; -import React from 'react'; import { primaryColor } from 'src/styles/variables.const'; diff --git a/src/components/accueil/Filters/Filters.tsx b/src/components/accueil/Filters/Filters.tsx index 7ca4a1b20..7b58c7208 100644 --- a/src/components/accueil/Filters/Filters.tsx +++ b/src/components/accueil/Filters/Filters.tsx @@ -1,6 +1,7 @@ +import React from 'react'; + import { Box } from '@mui/material'; import Checkbox from '@mui/material/Checkbox'; -import React from 'react'; import { FilterSelect } from './FilterSelect'; import { Flag } from 'src/components/Flag'; diff --git a/src/components/accueil/LastActivities.tsx b/src/components/accueil/LastActivities.tsx index 70a3f4d0f..f62ca7dcd 100644 --- a/src/components/accueil/LastActivities.tsx +++ b/src/components/accueil/LastActivities.tsx @@ -1,6 +1,7 @@ -import { Button } from '@mui/material'; import React from 'react'; +import { Button } from '@mui/material'; + import { CommentIcon } from '../activities/ActivityCard/CommentIcon'; import { icons, DESC } from 'src/components/activities/utils'; import { useActivities } from 'src/services/useActivities'; diff --git a/src/components/accueil/LinkChild.tsx b/src/components/accueil/LinkChild.tsx index 76f92c3d3..58a8fab51 100644 --- a/src/components/accueil/LinkChild.tsx +++ b/src/components/accueil/LinkChild.tsx @@ -1,8 +1,9 @@ -import { Button, TextField } from '@mui/material'; import { useRouter } from 'next/router'; import { useSnackbar } from 'notistack'; import React from 'react'; +import { Button, TextField } from '@mui/material'; + import { DeleteButton } from '../buttons/DeleteButton'; // import { ClassroomContext } from 'src/contexts/classroomContext'; import { UserContext } from 'src/contexts/userContext'; diff --git a/src/components/accueil/NewHome.tsx b/src/components/accueil/NewHome.tsx index f8e5626a2..2f711cc6f 100644 --- a/src/components/accueil/NewHome.tsx +++ b/src/components/accueil/NewHome.tsx @@ -1,7 +1,8 @@ -import { Box, Button, Grid, Typography } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; +import { Box, Button, Grid, Typography } from '@mui/material'; + import Home from 'src/svg/home.svg'; import Logo from 'src/svg/logo_1village.svg'; import School from 'src/svg/school.svg'; diff --git a/src/components/accueil/PelicoProfilNavigation.tsx b/src/components/accueil/PelicoProfilNavigation.tsx index 70d937cd5..9501dc6de 100644 --- a/src/components/accueil/PelicoProfilNavigation.tsx +++ b/src/components/accueil/PelicoProfilNavigation.tsx @@ -1,6 +1,7 @@ -import { Avatar, Button } from '@mui/material'; import React from 'react'; +import { Avatar, Button } from '@mui/material'; + import { CommentIcon } from '../activities/ActivityCard/CommentIcon'; import { icons, DESC } from 'src/components/activities/utils'; import { useActivities } from 'src/services/useActivities'; diff --git a/src/components/accueil/RightNavigation.tsx b/src/components/accueil/RightNavigation.tsx index 5e6d66ee8..d7eb2e154 100644 --- a/src/components/accueil/RightNavigation.tsx +++ b/src/components/accueil/RightNavigation.tsx @@ -1,9 +1,10 @@ -import { Box, Button, Link, Tooltip } from '@mui/material'; import Image from 'next/image'; import { useRouter } from 'next/router'; import type { ReactNode } from 'react'; import React from 'react'; +import { Box, Button, Link, Tooltip } from '@mui/material'; + import { AvatarImg } from '../Avatar'; import { Flag } from '../Flag'; import { LastActivities } from './LastActivities'; diff --git a/src/components/accueil/SubHeader.tsx b/src/components/accueil/SubHeader.tsx index e54e39c00..caf47a49e 100644 --- a/src/components/accueil/SubHeader.tsx +++ b/src/components/accueil/SubHeader.tsx @@ -1,7 +1,8 @@ -import { Box, Typography } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; +import { Box, Typography } from '@mui/material'; + import { VillageContext } from 'src/contexts/villageContext'; import { primaryColor } from 'src/styles/variables.const'; import JumellesLight from 'src/svg/jumelles-light.svg'; diff --git a/src/components/accueil/VideoPresentation.tsx b/src/components/accueil/VideoPresentation.tsx index ba546248f..18d451880 100644 --- a/src/components/accueil/VideoPresentation.tsx +++ b/src/components/accueil/VideoPresentation.tsx @@ -1,8 +1,9 @@ // import { Button, Link as RegisterLink, NoSsr, Box, TextField, Grid } from '@mui/material'; -import { Button, Link as RegisterLink, NoSsr } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import { Button, Link as RegisterLink, NoSsr } from '@mui/material'; + import { KeepRatio } from 'src/components/KeepRatio'; import Logo from 'src/svg/logo.svg'; // import PelicoReflechit from 'src/svg/pelico/pelico_reflechit.svg'; diff --git a/src/components/accueil/VillageComponent.tsx b/src/components/accueil/VillageComponent.tsx index 08e3bd5c6..edbca546e 100644 --- a/src/components/accueil/VillageComponent.tsx +++ b/src/components/accueil/VillageComponent.tsx @@ -1,6 +1,7 @@ +import React from 'react'; + import Card from '@mui/material/Card'; import CardActionArea from '@mui/material/CardActionArea'; -import React from 'react'; import { KeepRatio } from 'src/components/KeepRatio'; import Acti1 from 'src/svg/activities/acti1.svg'; diff --git a/src/components/activities/ActivityCard/AnthemCard.tsx b/src/components/activities/ActivityCard/AnthemCard.tsx index be055ef93..6bd51527d 100644 --- a/src/components/activities/ActivityCard/AnthemCard.tsx +++ b/src/components/activities/ActivityCard/AnthemCard.tsx @@ -1,7 +1,8 @@ -import { Button } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import { Button } from '@mui/material'; + import { CommentIcon } from './CommentIcon'; import type { ActivityCardProps } from './activity-card.types'; import { RedButton } from 'src/components/buttons/RedButton'; diff --git a/src/components/activities/ActivityCard/DefiCard.tsx b/src/components/activities/ActivityCard/DefiCard.tsx index e0448d832..745c6d3c7 100644 --- a/src/components/activities/ActivityCard/DefiCard.tsx +++ b/src/components/activities/ActivityCard/DefiCard.tsx @@ -1,9 +1,10 @@ -import { Button } from '@mui/material'; import Image from 'next/image'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; +import { Button } from '@mui/material'; + import { CommentIcon } from './CommentIcon'; import type { ActivityCardProps } from './activity-card.types'; import { ECO_ACTIONS, getDefi, getLanguageTheme, isCooking, isEco, isLanguage } from 'src/activity-types/defi.constants'; diff --git a/src/components/activities/ActivityCard/EnigmeCard.tsx b/src/components/activities/ActivityCard/EnigmeCard.tsx index efcdb3a45..0efcf3f4f 100644 --- a/src/components/activities/ActivityCard/EnigmeCard.tsx +++ b/src/components/activities/ActivityCard/EnigmeCard.tsx @@ -1,9 +1,10 @@ -import { Button } from '@mui/material'; import Image from 'next/image'; import Link from 'next/link'; import router from 'next/router'; import React from 'react'; +import { Button } from '@mui/material'; + import { CommentIcon } from './CommentIcon'; import type { ActivityCardProps } from './activity-card.types'; import { ENIGME_TYPES } from 'src/activity-types/enigme.constants'; diff --git a/src/components/activities/ActivityCard/FreeContentCard.tsx b/src/components/activities/ActivityCard/FreeContentCard.tsx index 5266d9c9f..64b99f4c9 100644 --- a/src/components/activities/ActivityCard/FreeContentCard.tsx +++ b/src/components/activities/ActivityCard/FreeContentCard.tsx @@ -1,9 +1,10 @@ -import { Button } from '@mui/material'; import Image from 'next/image'; import Link from 'next/link'; import router from 'next/router'; import React from 'react'; +import { Button } from '@mui/material'; + import { CommentIcon } from './CommentIcon'; import type { ActivityCardProps } from './activity-card.types'; import { getImage } from 'src/activity-types/freeContent.constants'; diff --git a/src/components/activities/ActivityCard/GameCard.tsx b/src/components/activities/ActivityCard/GameCard.tsx index 1a3131645..da16d8064 100644 --- a/src/components/activities/ActivityCard/GameCard.tsx +++ b/src/components/activities/ActivityCard/GameCard.tsx @@ -1,10 +1,11 @@ -import { Button } from '@mui/material'; import Image from 'next/image'; import Link from 'next/link'; import router from 'next/router'; import React, { useState, useEffect } from 'react'; import ReactPlayer from 'react-player'; +import { Button } from '@mui/material'; + import { CommentIcon } from './CommentIcon'; import type { ActivityCardProps } from './activity-card.types'; import { useCountAllStandardGame } from 'src/api/game/game.getAllGames'; diff --git a/src/components/activities/ActivityCard/GameCardMaClasse.tsx b/src/components/activities/ActivityCard/GameCardMaClasse.tsx index 03f5711ef..27e364aad 100644 --- a/src/components/activities/ActivityCard/GameCardMaClasse.tsx +++ b/src/components/activities/ActivityCard/GameCardMaClasse.tsx @@ -1,10 +1,11 @@ -import { Button, Paper } from '@mui/material'; import Image from 'next/image'; import Link from 'next/link'; import router from 'next/router'; import React from 'react'; import ReactPlayer from 'react-player'; +import { Button, Paper } from '@mui/material'; + import { titles, REACTIONS, icons } from '../utils'; import { CommentIcon } from './CommentIcon'; import type { ActivityCardProps } from './activity-card.types'; diff --git a/src/components/activities/ActivityCard/IndiceCard.tsx b/src/components/activities/ActivityCard/IndiceCard.tsx index 3b4208705..4c4fa84c9 100644 --- a/src/components/activities/ActivityCard/IndiceCard.tsx +++ b/src/components/activities/ActivityCard/IndiceCard.tsx @@ -1,9 +1,10 @@ -import { Button } from '@mui/material'; import Image from 'next/image'; import Link from 'next/link'; import router from 'next/router'; import React from 'react'; +import { Button } from '@mui/material'; + import { CommentIcon } from './CommentIcon'; import type { ActivityCardProps } from './activity-card.types'; import { getIndice } from 'src/activity-types/indice.constants'; diff --git a/src/components/activities/ActivityCard/MascotteCard.tsx b/src/components/activities/ActivityCard/MascotteCard.tsx index 135867181..6158ca857 100644 --- a/src/components/activities/ActivityCard/MascotteCard.tsx +++ b/src/components/activities/ActivityCard/MascotteCard.tsx @@ -1,7 +1,8 @@ -import { Button } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import { Button } from '@mui/material'; + import { CommentIcon } from './CommentIcon'; import type { ActivityCardProps } from './activity-card.types'; import type { MascotteActivity } from 'src/activity-types/mascotte.types'; diff --git a/src/components/activities/ActivityCard/MimicCard.tsx b/src/components/activities/ActivityCard/MimicCard.tsx index 382f0fcba..601ed2b8b 100644 --- a/src/components/activities/ActivityCard/MimicCard.tsx +++ b/src/components/activities/ActivityCard/MimicCard.tsx @@ -1,9 +1,10 @@ -import { Button } from '@mui/material'; import Link from 'next/link'; import router from 'next/router'; import React, { useState, useMemo, useEffect } from 'react'; import ReactPlayer from 'react-player'; +import { Button } from '@mui/material'; + import { CommentIcon } from './CommentIcon'; import type { ActivityCardProps } from './activity-card.types'; import { RedButton } from 'src/components/buttons/RedButton'; diff --git a/src/components/activities/ActivityCard/PresentationCard.tsx b/src/components/activities/ActivityCard/PresentationCard.tsx index ac06fbbbe..250d371f1 100644 --- a/src/components/activities/ActivityCard/PresentationCard.tsx +++ b/src/components/activities/ActivityCard/PresentationCard.tsx @@ -1,9 +1,10 @@ -import { Button } from '@mui/material'; import Image from 'next/image'; import Link from 'next/link'; import router from 'next/router'; import React from 'react'; +import { Button } from '@mui/material'; + import { CommentIcon } from './CommentIcon'; import type { ActivityCardProps } from './activity-card.types'; import { PRESENTATION_THEMATIQUE } from 'src/activity-types/presentation.constants'; diff --git a/src/components/activities/ActivityCard/QuestionCard.tsx b/src/components/activities/ActivityCard/QuestionCard.tsx index 9e1540945..2e8141a19 100644 --- a/src/components/activities/ActivityCard/QuestionCard.tsx +++ b/src/components/activities/ActivityCard/QuestionCard.tsx @@ -1,7 +1,8 @@ -import { Button } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import { Button } from '@mui/material'; + import { CommentIcon } from './CommentIcon'; import type { ActivityCardProps } from './activity-card.types'; import type { QuestionActivity } from 'src/activity-types/question.types'; diff --git a/src/components/activities/ActivityCard/ReactionCard.tsx b/src/components/activities/ActivityCard/ReactionCard.tsx index 43c39b1cb..e677c5a97 100644 --- a/src/components/activities/ActivityCard/ReactionCard.tsx +++ b/src/components/activities/ActivityCard/ReactionCard.tsx @@ -1,8 +1,9 @@ -import { Button } from '@mui/material'; import Image from 'next/image'; import Link from 'next/link'; import React from 'react'; +import { Button } from '@mui/material'; + import { CommentIcon } from './CommentIcon'; import type { ActivityCardProps } from './activity-card.types'; import type { ReactionActivity } from 'src/activity-types/reaction.types'; diff --git a/src/components/activities/ActivityCard/ReportageCard.tsx b/src/components/activities/ActivityCard/ReportageCard.tsx index 0485aedd6..bf5c5ef2a 100644 --- a/src/components/activities/ActivityCard/ReportageCard.tsx +++ b/src/components/activities/ActivityCard/ReportageCard.tsx @@ -1,10 +1,11 @@ -import { Button } from '@mui/material'; import Image from 'next/image'; import Link from 'next/link'; import router from 'next/router'; import React from 'react'; import ReactPlayer from 'react-player'; +import { Button } from '@mui/material'; + import { CommentIcon } from './CommentIcon'; import type { ActivityCardProps } from './activity-card.types'; import { getReportage } from 'src/activity-types/reportage.constants'; diff --git a/src/components/activities/ActivityCard/StoryCard.tsx b/src/components/activities/ActivityCard/StoryCard.tsx index ec719fff8..7f7af01d9 100644 --- a/src/components/activities/ActivityCard/StoryCard.tsx +++ b/src/components/activities/ActivityCard/StoryCard.tsx @@ -1,9 +1,10 @@ -import { Button } from '@mui/material'; import Image from 'next/image'; import Link from 'next/link'; import router from 'next/router'; import React from 'react'; +import { Button } from '@mui/material'; + import { CommentIcon } from './CommentIcon'; import type { ActivityCardProps } from './activity-card.types'; import { RedButton } from 'src/components/buttons/RedButton'; diff --git a/src/components/activities/ActivityCard/SymbolCard.tsx b/src/components/activities/ActivityCard/SymbolCard.tsx index feaa5f9a2..61ba895bb 100644 --- a/src/components/activities/ActivityCard/SymbolCard.tsx +++ b/src/components/activities/ActivityCard/SymbolCard.tsx @@ -1,9 +1,10 @@ -import { Button } from '@mui/material'; import Image from 'next/image'; import Link from 'next/link'; import router from 'next/router'; import React from 'react'; +import { Button } from '@mui/material'; + import { CommentIcon } from './CommentIcon'; import type { ActivityCardProps } from './activity-card.types'; import { getSymbol } from 'src/activity-types/symbol.constants'; diff --git a/src/components/activities/ActivityCard/VerseRecordCard.tsx b/src/components/activities/ActivityCard/VerseRecordCard.tsx index b9bf7669e..ae4e27bbc 100644 --- a/src/components/activities/ActivityCard/VerseRecordCard.tsx +++ b/src/components/activities/ActivityCard/VerseRecordCard.tsx @@ -1,7 +1,8 @@ -import { Box, Button } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import { Box, Button } from '@mui/material'; + import { CommentIcon } from './CommentIcon'; import type { ActivityCardProps } from './activity-card.types'; import { RedButton } from 'src/components/buttons/RedButton'; diff --git a/src/components/activities/ActivityCard/activity-admin/ActivityCardAdmin.tsx b/src/components/activities/ActivityCard/activity-admin/ActivityCardAdmin.tsx index 0e91b988b..18351ba30 100644 --- a/src/components/activities/ActivityCard/activity-admin/ActivityCardAdmin.tsx +++ b/src/components/activities/ActivityCard/activity-admin/ActivityCardAdmin.tsx @@ -1,11 +1,12 @@ -import MoreVertIcon from '@mui/icons-material/MoreVert'; -import { Card, CardHeader, Avatar, CardMedia, CardContent, Typography, Button, CardActions, Menu, MenuItem } from '@mui/material'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React, { useEffect } from 'react'; import { useQueryClient } from 'react-query'; import type { Activity } from 'server/entities/activity'; +import MoreVertIcon from '@mui/icons-material/MoreVert'; +import { Card, CardHeader, Avatar, CardMedia, CardContent, Typography, Button, CardActions, Menu, MenuItem } from '@mui/material'; + import { deleteActivity } from 'src/api/activities/activities.admin.delete'; import { useGetChildrenActivitiesById } from 'src/api/activities/activities.adminGetChildren'; import { usePublishActivity } from 'src/api/activities/activities.put'; diff --git a/src/components/activities/ActivityCard/activity-admin/ActivityCardAdminList.tsx b/src/components/activities/ActivityCard/activity-admin/ActivityCardAdminList.tsx index a1dbd958c..b26ea68d8 100644 --- a/src/components/activities/ActivityCard/activity-admin/ActivityCardAdminList.tsx +++ b/src/components/activities/ActivityCard/activity-admin/ActivityCardAdminList.tsx @@ -1,8 +1,9 @@ -import { Button, Button, useMediaQuery } from '@mui/material'; -import Paper from '@mui/material/Paper'; import React from 'react'; import type { Activity } from 'server/entities/activity'; +import { Button, useMediaQuery } from '@mui/material'; +import Paper from '@mui/material/Paper'; + import ActivityCardAdmin from './ActivityCardAdmin'; type Props = { diff --git a/src/components/activities/ActivityCard/activity-admin/AllActivitiesAdmin.tsx b/src/components/activities/ActivityCard/activity-admin/AllActivitiesAdmin.tsx index 160cca44d..1f9ee1fe4 100644 --- a/src/components/activities/ActivityCard/activity-admin/AllActivitiesAdmin.tsx +++ b/src/components/activities/ActivityCard/activity-admin/AllActivitiesAdmin.tsx @@ -1,8 +1,9 @@ -import type { SelectChangeEvent, SelectChangeEvent } from '@mui/material'; -import { useMediaQuery } from '@mui/material'; import React, { useCallback, useState } from 'react'; import type { Activity } from 'server/entities/activity'; +import type { SelectChangeEvent } from '@mui/material'; +import { useMediaQuery } from '@mui/material'; + import PelicoNoContent from 'src/components/NoContentPelico'; import PaginationNav from 'src/components/PaginationNav/PaginationNav'; import ActivityCardAdmin from 'src/components/activities/ActivityCard/activity-admin/ActivityCardAdmin'; diff --git a/src/components/activities/ActivityCard/index.tsx b/src/components/activities/ActivityCard/index.tsx index 13a9e35f3..b465a636b 100644 --- a/src/components/activities/ActivityCard/index.tsx +++ b/src/components/activities/ActivityCard/index.tsx @@ -1,8 +1,9 @@ -import { Box } from '@mui/material'; -import Paper from '@mui/material/Paper'; import Link from 'next/link'; import React from 'react'; +import { Box } from '@mui/material'; +import Paper from '@mui/material/Paper'; + import { titles, icons, REACTIONS } from '../utils'; import { AnthemCard } from './AnthemCard'; import { DefiCard } from './DefiCard'; diff --git a/src/components/activities/ActivityChoice/ActivityChoiceButton.tsx b/src/components/activities/ActivityChoice/ActivityChoiceButton.tsx index 09ad0713e..dbfa37b23 100644 --- a/src/components/activities/ActivityChoice/ActivityChoiceButton.tsx +++ b/src/components/activities/ActivityChoice/ActivityChoiceButton.tsx @@ -1,7 +1,8 @@ -import ButtonBase from '@mui/material/ButtonBase'; import Link from 'next/link'; import React from 'react'; +import ButtonBase from '@mui/material/ButtonBase'; + import { KeepRatio } from 'src/components/KeepRatio'; interface ActivityChoiceButtonProps { diff --git a/src/components/activities/ActivityChoice/index.tsx b/src/components/activities/ActivityChoice/index.tsx index f1e07b4b4..4d402b5b8 100644 --- a/src/components/activities/ActivityChoice/index.tsx +++ b/src/components/activities/ActivityChoice/index.tsx @@ -1,6 +1,7 @@ -import { Tooltip } from '@mui/material'; import React, { useCallback, useContext } from 'react'; +import { Tooltip } from '@mui/material'; + import { ActivityChoiceButton } from './ActivityChoiceButton'; import { GameContext } from 'src/contexts/gameContext'; import type { GameType } from 'types/game.type'; diff --git a/src/components/activities/ActivityComments/AddComment.tsx b/src/components/activities/ActivityComments/AddComment.tsx index 8782232aa..527f6607b 100644 --- a/src/components/activities/ActivityComments/AddComment.tsx +++ b/src/components/activities/ActivityComments/AddComment.tsx @@ -1,8 +1,9 @@ -import { Box, Button, CircularProgress, Tooltip } from '@mui/material'; import dynamic from 'next/dynamic'; import Link from 'next/link'; import React from 'react'; +import { Box, Button, CircularProgress, Tooltip } from '@mui/material'; + import { AvatarImg } from 'src/components/Avatar'; import { UserContext } from 'src/contexts/userContext'; import { useCommentRequests } from 'src/services/useComments'; diff --git a/src/components/activities/ActivityComments/CommentCard.tsx b/src/components/activities/ActivityComments/CommentCard.tsx index 6828f3c2c..e8d34f189 100644 --- a/src/components/activities/ActivityComments/CommentCard.tsx +++ b/src/components/activities/ActivityComments/CommentCard.tsx @@ -1,7 +1,8 @@ -import { Box, Button, CircularProgress, Paper } from '@mui/material'; import dynamic from 'next/dynamic'; import React from 'react'; +import { Box, Button, CircularProgress, Paper } from '@mui/material'; + import type { DataUse } from 'src/api/game/game.getOneGameById'; import { AvatarImg } from 'src/components/Avatar'; import { Flag } from 'src/components/Flag'; diff --git a/src/components/activities/ActivitySelect.tsx b/src/components/activities/ActivitySelect.tsx index 9a5c495f8..bc39302d7 100644 --- a/src/components/activities/ActivitySelect.tsx +++ b/src/components/activities/ActivitySelect.tsx @@ -1,6 +1,7 @@ +import React from 'react'; + import ChevronRightIcon from '@mui/icons-material/ChevronRight'; import { Box, Button, CircularProgress } from '@mui/material'; -import React from 'react'; import { Activities } from './List'; import { ThemeChoiceButton } from 'src/components/buttons/ThemeChoiceButton'; diff --git a/src/components/activities/ActivityView/DefiActivityView.tsx b/src/components/activities/ActivityView/DefiActivityView.tsx index 521485108..1e47e0314 100644 --- a/src/components/activities/ActivityView/DefiActivityView.tsx +++ b/src/components/activities/ActivityView/DefiActivityView.tsx @@ -1,7 +1,8 @@ -import { Grid } from '@mui/material'; import Image from 'next/image'; import React from 'react'; +import { Grid } from '@mui/material'; + import type { ActivityViewProps } from './activity-view.types'; import { ECO_ACTIONS, getDefi, isCooking, isEco, isLanguage, getLanguageTheme } from 'src/activity-types/defi.constants'; import type { DefiActivity } from 'src/activity-types/defi.types'; diff --git a/src/components/activities/ActivityView/EnigmeActivityView.tsx b/src/components/activities/ActivityView/EnigmeActivityView.tsx index c59e41b23..304866850 100644 --- a/src/components/activities/ActivityView/EnigmeActivityView.tsx +++ b/src/components/activities/ActivityView/EnigmeActivityView.tsx @@ -1,7 +1,8 @@ -import { Button, Card } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import { Button, Card } from '@mui/material'; + import type { ActivityViewProps } from './activity-view.types'; import { ENIGME_TYPES, getEnigmeTimeLeft } from 'src/activity-types/enigme.constants'; import type { EnigmeActivity, EnigmeData } from 'src/activity-types/enigme.types'; diff --git a/src/components/activities/ActivityView/MascotteActivityView.tsx b/src/components/activities/ActivityView/MascotteActivityView.tsx index 35f7cb1c3..2bc0d8253 100644 --- a/src/components/activities/ActivityView/MascotteActivityView.tsx +++ b/src/components/activities/ActivityView/MascotteActivityView.tsx @@ -1,6 +1,7 @@ -import { Grid, Box } from '@mui/material'; import React from 'react'; +import { Grid, Box } from '@mui/material'; + import { ImageView } from '../content/views/ImageView'; import type { ActivityViewProps } from './activity-view.types'; import type { MascotteActivity } from 'src/activity-types/mascotte.types'; diff --git a/src/components/activities/ActivityView/StoriesDataCardView.tsx b/src/components/activities/ActivityView/StoriesDataCardView.tsx index 611f5a56d..219e4d2ad 100644 --- a/src/components/activities/ActivityView/StoriesDataCardView.tsx +++ b/src/components/activities/ActivityView/StoriesDataCardView.tsx @@ -1,6 +1,7 @@ -import { Grid } from '@mui/material'; import React from 'react'; +import { Grid } from '@mui/material'; + import { ActivityCard } from '../ActivityCard'; import { useImageStories } from 'src/services/useImagesStory'; import { useVillageUsers } from 'src/services/useVillageUsers'; diff --git a/src/components/activities/ActivityView/StoryActivityView.tsx b/src/components/activities/ActivityView/StoryActivityView.tsx index 46e4c17b8..e34f6b64c 100644 --- a/src/components/activities/ActivityView/StoryActivityView.tsx +++ b/src/components/activities/ActivityView/StoryActivityView.tsx @@ -1,11 +1,12 @@ +import Image from 'next/image'; +import React from 'react'; + import { Container } from '@mui/material'; import Card from '@mui/material/Card'; import CardMedia from '@mui/material/CardMedia'; import Grid from '@mui/material/Grid'; import Typography from '@mui/material/Typography'; import { Box } from '@mui/system'; -import Image from 'next/image'; -import React from 'react'; import StoriesDataCardView from './StoriesDataCardView'; import type { ActivityViewProps } from './activity-view.types'; diff --git a/src/components/activities/List.tsx b/src/components/activities/List.tsx index bfd5dee1f..c81e86130 100644 --- a/src/components/activities/List.tsx +++ b/src/components/activities/List.tsx @@ -1,7 +1,8 @@ +import { useRouter } from 'next/router'; +import React from 'react'; + import type { SelectChangeEvent } from '@mui/material'; import { Button } from '@mui/material'; -import { useRouter } from 'next/router'; -import React, { useState } from 'react'; import PaginationNav from '../PaginationNav/PaginationNav'; import { ActivityCard } from './ActivityCard'; diff --git a/src/components/activities/anthem/AnthemTrack/AnthemTrack.tsx b/src/components/activities/anthem/AnthemTrack/AnthemTrack.tsx index 116844d54..d1f3383d8 100644 --- a/src/components/activities/anthem/AnthemTrack/AnthemTrack.tsx +++ b/src/components/activities/anthem/AnthemTrack/AnthemTrack.tsx @@ -1,6 +1,7 @@ -import { Alert, Box, TextField } from '@mui/material'; import React from 'react'; +import { Alert, Box, TextField } from '@mui/material'; + import type { DisplayableInstrumentsType } from '../../../../utils/instruments'; import AudioEditor from '../../content/editors/AudioEditor/AudioEditor'; import AnthemTrackIcon from '../AnthemTrackIcon/AnthemTrackIcon'; diff --git a/src/components/activities/anthem/AnthemTrackIcon/AnthemTrackIcon.tsx b/src/components/activities/anthem/AnthemTrackIcon/AnthemTrackIcon.tsx index a5628d0f6..a563d299d 100644 --- a/src/components/activities/anthem/AnthemTrackIcon/AnthemTrackIcon.tsx +++ b/src/components/activities/anthem/AnthemTrackIcon/AnthemTrackIcon.tsx @@ -1,6 +1,7 @@ -import { TextField, IconButton, Autocomplete, Popper, Fade, Paper, Box, Icon } from '@mui/material'; import React, { useState } from 'react'; +import { TextField, IconButton, Autocomplete, Popper, Fade, Paper, Box, Icon } from '@mui/material'; + import type { DisplayableInstrumentsType } from '../../../../utils/instruments'; import { InstrumentSvg } from '../InstrumentSvg/InstrumentSvg'; import styles from './AnthemTrackIcon.module.css'; diff --git a/src/components/activities/content/AddContentCard.tsx b/src/components/activities/content/AddContentCard.tsx index f9af6fbf0..418eb30b4 100644 --- a/src/components/activities/content/AddContentCard.tsx +++ b/src/components/activities/content/AddContentCard.tsx @@ -1,6 +1,7 @@ +import React from 'react'; + import AppsIcon from '@mui/icons-material/Apps'; import { ButtonBase, Card } from '@mui/material'; -import React from 'react'; import { UserContext } from 'src/contexts/userContext'; import DocumentIcon from 'src/svg/editor/document_icon.svg'; diff --git a/src/components/activities/content/MascotteTemplate.tsx b/src/components/activities/content/MascotteTemplate.tsx index c2503dc70..0c8559f25 100644 --- a/src/components/activities/content/MascotteTemplate.tsx +++ b/src/components/activities/content/MascotteTemplate.tsx @@ -1,8 +1,9 @@ -import { Button } from '@mui/material'; -import Paper from '@mui/material/Paper'; import Link from 'next/link'; import React from 'react'; +import { Button } from '@mui/material'; +import Paper from '@mui/material/Paper'; + import { AvatarImg } from 'src/components/Avatar'; import { UserDisplayName } from 'src/components/UserDisplayName'; import { primaryColor } from 'src/styles/variables.const'; diff --git a/src/components/activities/content/editors/AudioEditor/AudioEditor.tsx b/src/components/activities/content/editors/AudioEditor/AudioEditor.tsx index 20be7ee8c..22b1ba4cb 100644 --- a/src/components/activities/content/editors/AudioEditor/AudioEditor.tsx +++ b/src/components/activities/content/editors/AudioEditor/AudioEditor.tsx @@ -1,8 +1,9 @@ +import { useSnackbar } from 'notistack'; +import React from 'react'; + import CloudUploadIcon from '@mui/icons-material/CloudUpload'; import { Button, Divider, TextField } from '@mui/material'; import Alert from '@mui/material/Alert'; -import { useSnackbar } from 'notistack'; -import React from 'react'; import styles from './AudioEditor.module.css'; import { Modal } from 'src/components/Modal'; diff --git a/src/components/activities/content/editors/DocumentEditor/DocumentEditor.tsx b/src/components/activities/content/editors/DocumentEditor/DocumentEditor.tsx index 4916dc142..d490e7fa1 100644 --- a/src/components/activities/content/editors/DocumentEditor/DocumentEditor.tsx +++ b/src/components/activities/content/editors/DocumentEditor/DocumentEditor.tsx @@ -1,6 +1,7 @@ -import { Button } from '@mui/material'; import React, { useState } from 'react'; +import { Button } from '@mui/material'; + import { EditorContainer } from '../EditorContainer'; import DocumentModal from './DocumentModal'; import PdfDisplay from './PdfDisplay'; diff --git a/src/components/activities/content/editors/DocumentEditor/DocumentModal.tsx b/src/components/activities/content/editors/DocumentEditor/DocumentModal.tsx index 59416924d..7ee082cea 100644 --- a/src/components/activities/content/editors/DocumentEditor/DocumentModal.tsx +++ b/src/components/activities/content/editors/DocumentEditor/DocumentModal.tsx @@ -1,6 +1,7 @@ +import React, { useState } from 'react'; + import CloudUploadIcon from '@mui/icons-material/CloudUpload'; import { Button } from '@mui/material'; -import React, { useState } from 'react'; import PdfDisplay from './PdfDisplay'; import { useUploadFiles } from 'src/api/files/uploadFiles.post'; diff --git a/src/components/activities/content/editors/EditorContainer.tsx b/src/components/activities/content/editors/EditorContainer.tsx index d7ea91556..7cbfe99ac 100644 --- a/src/components/activities/content/editors/EditorContainer.tsx +++ b/src/components/activities/content/editors/EditorContainer.tsx @@ -1,7 +1,8 @@ -import DragIndicatorIcon from '@mui/icons-material/DragIndicator'; import classnames from 'classnames'; import React from 'react'; +import DragIndicatorIcon from '@mui/icons-material/DragIndicator'; + import { DeleteButton } from 'src/components/buttons/DeleteButton'; interface EditorContainerProps { diff --git a/src/components/activities/content/editors/H5pEditor.tsx b/src/components/activities/content/editors/H5pEditor.tsx index e8f07fd49..51a2ef2b5 100644 --- a/src/components/activities/content/editors/H5pEditor.tsx +++ b/src/components/activities/content/editors/H5pEditor.tsx @@ -1,8 +1,9 @@ -import { Button, Divider, FormControl, InputLabel, MenuItem, Select } from '@mui/material'; -import TextField from '@mui/material/TextField'; import Link from 'next/link'; import React from 'react'; +import { Button, Divider, FormControl, InputLabel, MenuItem, Select } from '@mui/material'; +import TextField from '@mui/material/TextField'; + import type { EditorProps } from '../content.types'; import { EditorContainer } from './EditorContainer'; import { useH5pContentList } from 'src/api/h5p/h5p-content.list'; diff --git a/src/components/activities/content/editors/ImageEditor/AvatarEditor.tsx b/src/components/activities/content/editors/ImageEditor/AvatarEditor.tsx index 3ff3156f9..a76a50560 100644 --- a/src/components/activities/content/editors/ImageEditor/AvatarEditor.tsx +++ b/src/components/activities/content/editors/ImageEditor/AvatarEditor.tsx @@ -1,6 +1,7 @@ +import React from 'react'; + import AddIcon from '@mui/icons-material/Add'; import { ButtonBase } from '@mui/material'; -import React from 'react'; import type { EditorProps } from '../../content.types'; import { ImageModal } from './ImageModal'; diff --git a/src/components/activities/content/editors/ImageEditor/ImageEditor.tsx b/src/components/activities/content/editors/ImageEditor/ImageEditor.tsx index a31a2260c..19db2fdbc 100644 --- a/src/components/activities/content/editors/ImageEditor/ImageEditor.tsx +++ b/src/components/activities/content/editors/ImageEditor/ImageEditor.tsx @@ -1,7 +1,8 @@ -import { Button } from '@mui/material'; import Image from 'next/image'; import React from 'react'; +import { Button } from '@mui/material'; + import type { EditorProps } from '../../content.types'; import { EditorContainer } from '../EditorContainer'; import { ImageModal } from './ImageModal'; diff --git a/src/components/activities/content/editors/ImageEditor/ImageModal.tsx b/src/components/activities/content/editors/ImageEditor/ImageModal.tsx index 8308d3739..0d1b49c1e 100644 --- a/src/components/activities/content/editors/ImageEditor/ImageModal.tsx +++ b/src/components/activities/content/editors/ImageEditor/ImageModal.tsx @@ -1,10 +1,11 @@ -import CloudUploadIcon from '@mui/icons-material/CloudUpload'; -import { Button, Divider, TextField } from '@mui/material'; -import Alert from '@mui/material/Alert'; import Image from 'next/image'; import { useSnackbar } from 'notistack'; import React from 'react'; +import CloudUploadIcon from '@mui/icons-material/CloudUpload'; +import { Button, Divider, TextField } from '@mui/material'; +import Alert from '@mui/material/Alert'; + import type { ImgCroppieRef } from 'src/components/ImgCroppie'; import { ImgCroppie } from 'src/components/ImgCroppie'; import { KeepRatio } from 'src/components/KeepRatio'; diff --git a/src/components/activities/content/editors/SoundEditor.tsx b/src/components/activities/content/editors/SoundEditor.tsx index c49918953..ec8d3d064 100644 --- a/src/components/activities/content/editors/SoundEditor.tsx +++ b/src/components/activities/content/editors/SoundEditor.tsx @@ -1,8 +1,9 @@ +import { useSnackbar } from 'notistack'; +import React from 'react'; + import CloudUploadIcon from '@mui/icons-material/CloudUpload'; import { Button, Divider, TextField } from '@mui/material'; import Alert from '@mui/material/Alert'; -import { useSnackbar } from 'notistack'; -import React from 'react'; import type { EditorProps } from '../content.types'; import { EditorContainer } from './EditorContainer'; diff --git a/src/components/activities/content/editors/SyllableEditor.tsx b/src/components/activities/content/editors/SyllableEditor.tsx index 081e1fa78..0f8098dba 100644 --- a/src/components/activities/content/editors/SyllableEditor.tsx +++ b/src/components/activities/content/editors/SyllableEditor.tsx @@ -1,6 +1,7 @@ -import { Box, InputBase } from '@mui/material'; import React from 'react'; +import { Box, InputBase } from '@mui/material'; + import { primaryColor } from 'src/styles/variables.const'; import BacklineIcon from 'src/svg/anthem/backline.svg'; import TrashIcon from 'src/svg/anthem/trash.svg'; diff --git a/src/components/activities/content/editors/TextEditor/SimpleTextEditor.tsx b/src/components/activities/content/editors/TextEditor/SimpleTextEditor.tsx index 7061aa5a8..2b840a2f1 100644 --- a/src/components/activities/content/editors/TextEditor/SimpleTextEditor.tsx +++ b/src/components/activities/content/editors/TextEditor/SimpleTextEditor.tsx @@ -1,5 +1,3 @@ -import { Divider } from '@mui/material'; -import Paper from '@mui/material/Paper'; import classnames from 'classnames'; import type { DraftHandleValue, DraftEditorCommand, ContentBlock } from 'draft-js'; import { Editor, RichUtils, CompositeDecorator, ContentState, convertToRaw, EditorState, Modifier } from 'draft-js'; @@ -19,6 +17,9 @@ import { import htmlToDraft from 'html-to-draftjs'; import React from 'react'; +import { Divider } from '@mui/material'; +import Paper from '@mui/material/Paper'; + import { ColorPicker } from './toolbar/ColorPicker'; import { EmojiPicker } from './toolbar/EmojiPicker'; import { InlineButtons } from './toolbar/InlineButtons'; diff --git a/src/components/activities/content/editors/TextEditor/toolbar/ColorPicker.tsx b/src/components/activities/content/editors/TextEditor/toolbar/ColorPicker.tsx index 0bf7f817c..46f001d83 100644 --- a/src/components/activities/content/editors/TextEditor/toolbar/ColorPicker.tsx +++ b/src/components/activities/content/editors/TextEditor/toolbar/ColorPicker.tsx @@ -1,9 +1,10 @@ +import React from 'react'; + import FormatColorTextIcon from '@mui/icons-material/FormatColorText'; import ClickAwayListener from '@mui/material/ClickAwayListener'; import Paper from '@mui/material/Paper'; import ToggleButton from '@mui/material/ToggleButton'; import ToggleButtonGroup from '@mui/material/ToggleButtonGroup'; -import React from 'react'; const colors = [ 'rgb(46, 52, 59)', diff --git a/src/components/activities/content/editors/TextEditor/toolbar/EmojiPicker.tsx b/src/components/activities/content/editors/TextEditor/toolbar/EmojiPicker.tsx index 15772ae82..a2a2dbcff 100644 --- a/src/components/activities/content/editors/TextEditor/toolbar/EmojiPicker.tsx +++ b/src/components/activities/content/editors/TextEditor/toolbar/EmojiPicker.tsx @@ -1,9 +1,10 @@ +import React from 'react'; + import InsertEmoticonIcon from '@mui/icons-material/InsertEmoticon'; import ClickAwayListener from '@mui/material/ClickAwayListener'; import Paper from '@mui/material/Paper'; import ToggleButton from '@mui/material/ToggleButton'; import ToggleButtonGroup from '@mui/material/ToggleButtonGroup'; -import React from 'react'; const emojis = [ '😀', diff --git a/src/components/activities/content/editors/TextEditor/toolbar/InlineButtons.tsx b/src/components/activities/content/editors/TextEditor/toolbar/InlineButtons.tsx index 0df18ae62..f8fc5ba9d 100644 --- a/src/components/activities/content/editors/TextEditor/toolbar/InlineButtons.tsx +++ b/src/components/activities/content/editors/TextEditor/toolbar/InlineButtons.tsx @@ -1,9 +1,10 @@ +import React from 'react'; + import FormatBoldIcon from '@mui/icons-material/FormatBold'; import FormatItalicIcon from '@mui/icons-material/FormatItalic'; import FormatUnderlinedIcon from '@mui/icons-material/FormatUnderlined'; import ToggleButton from '@mui/material/ToggleButton'; import ToggleButtonGroup from '@mui/material/ToggleButtonGroup'; -import React from 'react'; type InlineProps = { value: { diff --git a/src/components/activities/content/editors/TextEditor/toolbar/Link.tsx b/src/components/activities/content/editors/TextEditor/toolbar/Link.tsx index 7a19522d2..d72911643 100644 --- a/src/components/activities/content/editors/TextEditor/toolbar/Link.tsx +++ b/src/components/activities/content/editors/TextEditor/toolbar/Link.tsx @@ -1,12 +1,13 @@ +import { RichUtils, EditorState, Modifier } from 'draft-js'; +import type { ContentBlock, ContentState } from 'draft-js'; +import { getEntityRange, getSelectionEntity } from 'draftjs-utils'; +import React from 'react'; + import { TextField, Button } from '@mui/material'; import ClickAwayListener from '@mui/material/ClickAwayListener'; import Paper from '@mui/material/Paper'; import ToggleButton from '@mui/material/ToggleButton'; import ToggleButtonGroup from '@mui/material/ToggleButtonGroup'; -import { RichUtils, EditorState, Modifier } from 'draft-js'; -import type { ContentBlock, ContentState } from 'draft-js'; -import { getEntityRange, getSelectionEntity } from 'draftjs-utils'; -import React from 'react'; import { primaryColor } from 'src/styles/variables.const'; diff --git a/src/components/activities/content/editors/TextEditor/toolbar/TextAlignButtons.tsx b/src/components/activities/content/editors/TextEditor/toolbar/TextAlignButtons.tsx index e21e22970..ceeef7e75 100644 --- a/src/components/activities/content/editors/TextEditor/toolbar/TextAlignButtons.tsx +++ b/src/components/activities/content/editors/TextEditor/toolbar/TextAlignButtons.tsx @@ -1,9 +1,10 @@ +import React from 'react'; + import FormatAlignCenterIcon from '@mui/icons-material/FormatAlignCenter'; import FormatAlignLeftIcon from '@mui/icons-material/FormatAlignLeft'; import FormatAlignRightIcon from '@mui/icons-material/FormatAlignRight'; import ToggleButton from '@mui/material/ToggleButton'; import ToggleButtonGroup from '@mui/material/ToggleButtonGroup'; -import React from 'react'; type InlineProps = { value: 'left' | 'center' | 'right'; diff --git a/src/components/activities/content/editors/TextEditor/toolbar/TitleChoice.tsx b/src/components/activities/content/editors/TextEditor/toolbar/TitleChoice.tsx index 48c457b94..f012bc875 100644 --- a/src/components/activities/content/editors/TextEditor/toolbar/TitleChoice.tsx +++ b/src/components/activities/content/editors/TextEditor/toolbar/TitleChoice.tsx @@ -1,6 +1,7 @@ +import React from 'react'; + import ToggleButton from '@mui/material/ToggleButton'; import ToggleButtonGroup from '@mui/material/ToggleButtonGroup'; -import React from 'react'; type TitleChoiceProps = { value: 'unstyle' | 'header-one' | 'header-two'; diff --git a/src/components/activities/content/editors/VideoEditor/VideoEditor.tsx b/src/components/activities/content/editors/VideoEditor/VideoEditor.tsx index d4e348cbc..7fe3913a3 100644 --- a/src/components/activities/content/editors/VideoEditor/VideoEditor.tsx +++ b/src/components/activities/content/editors/VideoEditor/VideoEditor.tsx @@ -1,7 +1,8 @@ -import { Button } from '@mui/material'; import React from 'react'; import ReactPlayer from 'react-player'; +import { Button } from '@mui/material'; + import type { EditorProps } from '../../content.types'; import { EditorContainer } from '../EditorContainer'; import { VideoModals } from './VideoModals'; diff --git a/src/components/activities/content/editors/VideoEditor/VideoModals.tsx b/src/components/activities/content/editors/VideoEditor/VideoModals.tsx index 813977c1a..167ed29c2 100644 --- a/src/components/activities/content/editors/VideoEditor/VideoModals.tsx +++ b/src/components/activities/content/editors/VideoEditor/VideoModals.tsx @@ -1,13 +1,14 @@ -import CloudUploadIcon from '@mui/icons-material/CloudUpload'; -import SettingsIcon from '@mui/icons-material/Settings'; -import { Button, Divider, TextField } from '@mui/material'; -import Alert from '@mui/material/Alert'; import Link from 'next/link'; import { useSnackbar } from 'notistack'; import React from 'react'; import ReactPlayer from 'react-player'; import { useQueryClient } from 'react-query'; +import CloudUploadIcon from '@mui/icons-material/CloudUpload'; +import SettingsIcon from '@mui/icons-material/Settings'; +import { Button, Divider, TextField } from '@mui/material'; +import Alert from '@mui/material/Alert'; + import { Modal } from 'src/components/Modal'; import { useCopy } from 'src/hooks/useCopy'; import { defaultTextButtonStyle, fontDetailColor, bgPage } from 'src/styles/variables.const'; diff --git a/src/components/activities/content/views/SoundView.tsx b/src/components/activities/content/views/SoundView.tsx index e5cd007ed..5912faf3e 100644 --- a/src/components/activities/content/views/SoundView.tsx +++ b/src/components/activities/content/views/SoundView.tsx @@ -1,6 +1,7 @@ -import Alert from '@mui/material/Alert'; import React from 'react'; +import Alert from '@mui/material/Alert'; + import type { ViewProps } from '../content.types'; export const SoundView = ({ value }: ViewProps) => { diff --git a/src/components/activities/content/views/VideoView/VideoView.tsx b/src/components/activities/content/views/VideoView/VideoView.tsx index be075aea2..02ca521bc 100644 --- a/src/components/activities/content/views/VideoView/VideoView.tsx +++ b/src/components/activities/content/views/VideoView/VideoView.tsx @@ -1,8 +1,9 @@ -import { Button, CircularProgress } from '@mui/material'; import { useSnackbar } from 'notistack'; import React from 'react'; import ReactPlayer from 'react-player'; +import { Button, CircularProgress } from '@mui/material'; + import type { ViewProps } from '../../content.types'; import { KeepRatio } from 'src/components/KeepRatio'; import { serializeToQueryUrl } from 'src/utils'; diff --git a/src/components/admin/AdminHeader.tsx b/src/components/admin/AdminHeader.tsx index 0a966665b..2c41d1918 100644 --- a/src/components/admin/AdminHeader.tsx +++ b/src/components/admin/AdminHeader.tsx @@ -1,10 +1,11 @@ +import Link from 'next/link'; +import React from 'react'; + import { Button } from '@mui/material'; import AppBar from '@mui/material/AppBar'; import Toolbar from '@mui/material/Toolbar'; import Typography from '@mui/material/Typography'; import useScrollTrigger from '@mui/material/useScrollTrigger'; -import Link from 'next/link'; -import React from 'react'; import { defaultContainedButtonStyle } from 'src/styles/variables.const'; diff --git a/src/components/admin/AdminNavigation.tsx b/src/components/admin/AdminNavigation.tsx index 5fe87a60f..8570682cd 100644 --- a/src/components/admin/AdminNavigation.tsx +++ b/src/components/admin/AdminNavigation.tsx @@ -1,3 +1,6 @@ +import { useRouter } from 'next/router'; +import React from 'react'; + import GroupIcon from '@mui/icons-material/Group'; import InsertChartOutlinedOutlinedIcon from '@mui/icons-material/InsertChartOutlinedOutlined'; import LanguageIcon from '@mui/icons-material/Language'; @@ -11,8 +14,6 @@ import ListItem from '@mui/material/ListItem'; import ListItemIcon from '@mui/material/ListItemIcon'; import ListItemText from '@mui/material/ListItemText'; import Toolbar from '@mui/material/Toolbar'; -import { useRouter } from 'next/router'; -import React from 'react'; import { useIsH5pEnabled } from 'src/api/h5p/h5p-enabled'; diff --git a/src/components/admin/AdminTable.tsx b/src/components/admin/AdminTable.tsx index 62677ed1f..26e0d773d 100644 --- a/src/components/admin/AdminTable.tsx +++ b/src/components/admin/AdminTable.tsx @@ -1,3 +1,5 @@ +import React from 'react'; + import NoSsr from '@mui/material/NoSsr'; import Table from '@mui/material/Table'; import TableBody from '@mui/material/TableBody'; @@ -6,7 +8,6 @@ import TableHead from '@mui/material/TableHead'; import TablePagination from '@mui/material/TablePagination'; import TableRow from '@mui/material/TableRow'; import TableSortLabel from '@mui/material/TableSortLabel'; -import React from 'react'; function paginate(array: T[], pageSize: number, pageNumber: number): T[] { // human-readable page numbers usually start with 1, so we reduce 1 in the first argument diff --git a/src/components/admin/AdminTile.tsx b/src/components/admin/AdminTile.tsx index e7aaf4978..47a407f93 100644 --- a/src/components/admin/AdminTile.tsx +++ b/src/components/admin/AdminTile.tsx @@ -1,7 +1,8 @@ +import React from 'react'; + import Paper from '@mui/material/Paper'; import Toolbar from '@mui/material/Toolbar'; import Typography from '@mui/material/Typography'; -import React from 'react'; interface AdminTileProps { title: string; diff --git a/src/components/admin/NewAdminHeader.tsx b/src/components/admin/NewAdminHeader.tsx index 9c50940c6..52706cabf 100644 --- a/src/components/admin/NewAdminHeader.tsx +++ b/src/components/admin/NewAdminHeader.tsx @@ -1,7 +1,8 @@ -import { Button, AppBar, Toolbar, Typography, useScrollTrigger } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import { Button, AppBar, Toolbar, Typography, useScrollTrigger } from '@mui/material'; + import { primaryColor } from 'src/styles/variables.const'; import Logo from 'src/svg/logo.svg'; diff --git a/src/components/admin/NewAdminNavigation.tsx b/src/components/admin/NewAdminNavigation.tsx index c855e9d81..5dbed96b1 100644 --- a/src/components/admin/NewAdminNavigation.tsx +++ b/src/components/admin/NewAdminNavigation.tsx @@ -1,8 +1,9 @@ -import { Container, List, ListItem, ListItemIcon, ListItemText } from '@mui/material'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; +import { Container, List, ListItem, ListItemIcon, ListItemText } from '@mui/material'; + import { UserContext } from 'src/contexts/userContext'; import AnalyserIcon from 'src/svg/analyser.svg'; import CreerIcon from 'src/svg/creer.svg'; diff --git a/src/components/admin/OneVillageTable.tsx b/src/components/admin/OneVillageTable.tsx index c8e4ea2c6..5f6de7954 100644 --- a/src/components/admin/OneVillageTable.tsx +++ b/src/components/admin/OneVillageTable.tsx @@ -1,3 +1,5 @@ +import React from 'react'; + import RemoveRedEyeIcon from '@mui/icons-material/RemoveRedEye'; import { Box, Paper, TableContainer, TableSortLabel, useTheme } from '@mui/material'; import NoSsr from '@mui/material/NoSsr'; @@ -7,7 +9,6 @@ import TableCell from '@mui/material/TableCell'; import TableHead from '@mui/material/TableHead'; import TablePagination from '@mui/material/TablePagination'; import TableRow from '@mui/material/TableRow'; -import React from 'react'; import { primaryColorLight } from 'src/styles/variables.const'; diff --git a/src/components/admin/analytics/BarWidget.tsx b/src/components/admin/analytics/BarWidget.tsx index 6de392313..d9bbb704d 100644 --- a/src/components/admin/analytics/BarWidget.tsx +++ b/src/components/admin/analytics/BarWidget.tsx @@ -1,6 +1,7 @@ -import { Tab, Tabs, Paper } from '@mui/material'; import React from 'react'; +import { Tab, Tabs, Paper } from '@mui/material'; + import { primaryColorLight } from 'src/styles/variables.const'; interface BarWidgetProps { diff --git a/src/components/admin/analytics/TimePicker.tsx b/src/components/admin/analytics/TimePicker.tsx index a04860b52..552137fd9 100644 --- a/src/components/admin/analytics/TimePicker.tsx +++ b/src/components/admin/analytics/TimePicker.tsx @@ -1,8 +1,9 @@ +import React from 'react'; + import ChevronLeftIcon from '@mui/icons-material/ChevronLeft'; import ChevronRightIcon from '@mui/icons-material/ChevronRight'; import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown'; import { ButtonGroup, Button, Menu, MenuItem, Divider } from '@mui/material'; -import React from 'react'; import { defaultOutlinedButtonStyle } from 'src/styles/variables.const'; import { capitalize } from 'src/utils'; diff --git a/src/components/admin/dashboard-statistics/ClassroomStats.tsx b/src/components/admin/dashboard-statistics/ClassroomStats.tsx index 5b8a37ea7..d9f82dfe3 100644 --- a/src/components/admin/dashboard-statistics/ClassroomStats.tsx +++ b/src/components/admin/dashboard-statistics/ClassroomStats.tsx @@ -1,7 +1,8 @@ +import React, { useEffect, useState } from 'react'; + import AccessTimeIcon from '@mui/icons-material/AccessTime'; import VisibilityIcon from '@mui/icons-material/Visibility'; import { Box, Tab, Tabs } from '@mui/material'; -import React, { useEffect, useState } from 'react'; import { OneVillageTable } from '../OneVillageTable'; import TabPanel from './TabPanel'; diff --git a/src/components/admin/dashboard-statistics/CountryStats.tsx b/src/components/admin/dashboard-statistics/CountryStats.tsx index 4e646374f..2e3e7ff29 100644 --- a/src/components/admin/dashboard-statistics/CountryStats.tsx +++ b/src/components/admin/dashboard-statistics/CountryStats.tsx @@ -1,13 +1,13 @@ +import React, { useState } from 'react'; + import AccessTimeIcon from '@mui/icons-material/AccessTime'; import VisibilityIcon from '@mui/icons-material/Visibility'; -import React, { useState } from 'react'; import AverageStatsCard from './cards/AverageStatsCard/AverageStatsCard'; import ClassesExchangesCard from './cards/ClassesExchangesCard/ClassesExchangesCard'; import StatsCard from './cards/StatsCard/StatsCard'; import VillageListCard from './cards/VillageListCard/VillageListCard'; import BarCharts from './charts/BarCharts'; -import DashboardTable from './charts/DashboardTable'; import HorizontalBarsChart from './charts/HorizontalChart'; import PieCharts from './charts/PieCharts'; import CountriesDropdown from './filters/CountriesDropdown'; @@ -65,9 +65,9 @@ const CountryStats = () => { -
- -
+ {/*
+ +
*/}
Nombre de classes inscrites diff --git a/src/components/admin/dashboard-statistics/DashboardStatsNav.tsx b/src/components/admin/dashboard-statistics/DashboardStatsNav.tsx index 10c97d4a9..8ddb30ece 100644 --- a/src/components/admin/dashboard-statistics/DashboardStatsNav.tsx +++ b/src/components/admin/dashboard-statistics/DashboardStatsNav.tsx @@ -1,8 +1,9 @@ +import React from 'react'; + import Box from '@mui/material/Box'; import Tab from '@mui/material/Tab'; import Tabs from '@mui/material/Tabs'; import Typography from '@mui/material/Typography'; -import React from 'react'; import ClassroomStats from './ClassroomStats'; import CountryStats from './CountryStats'; diff --git a/src/components/admin/dashboard-statistics/GlobalStats.tsx b/src/components/admin/dashboard-statistics/GlobalStats.tsx index 8dd1ed738..7831c6a86 100644 --- a/src/components/admin/dashboard-statistics/GlobalStats.tsx +++ b/src/components/admin/dashboard-statistics/GlobalStats.tsx @@ -1,7 +1,8 @@ +import React, { useEffect, useState } from 'react'; + import AccessTimeIcon from '@mui/icons-material/AccessTime'; import VisibilityIcon from '@mui/icons-material/Visibility'; import { Box, Tab, Tabs } from '@mui/material'; -import React, { useEffect, useState } from 'react'; import { OneVillageTable } from '../OneVillageTable'; import TabPanel from './TabPanel'; diff --git a/src/components/admin/dashboard-statistics/TabPanel.tsx b/src/components/admin/dashboard-statistics/TabPanel.tsx index 5d134907d..2d5ca7db9 100644 --- a/src/components/admin/dashboard-statistics/TabPanel.tsx +++ b/src/components/admin/dashboard-statistics/TabPanel.tsx @@ -1,6 +1,7 @@ -import { Box, Typography } from '@mui/material'; import React from 'react'; +import { Box, Typography } from '@mui/material'; + interface TabPanelProps { children?: React.ReactNode; value: number; diff --git a/src/components/admin/dashboard-statistics/TeamComments.tsx b/src/components/admin/dashboard-statistics/TeamComments.tsx index e2ea42da6..6fb917f0f 100644 --- a/src/components/admin/dashboard-statistics/TeamComments.tsx +++ b/src/components/admin/dashboard-statistics/TeamComments.tsx @@ -1,6 +1,7 @@ -import { Button, Stack, TextField } from '@mui/material'; import React, { useState } from 'react'; +import { Button, Stack, TextField } from '@mui/material'; + import { EditButton } from 'src/components/buttons/EditButton'; const TeamComments = () => { diff --git a/src/components/admin/dashboard-statistics/VillageStats.tsx b/src/components/admin/dashboard-statistics/VillageStats.tsx index 2caa361a1..49f558782 100644 --- a/src/components/admin/dashboard-statistics/VillageStats.tsx +++ b/src/components/admin/dashboard-statistics/VillageStats.tsx @@ -1,7 +1,8 @@ +import React, { useContext, useEffect, useState } from 'react'; + import AccessTimeIcon from '@mui/icons-material/AccessTime'; import VisibilityIcon from '@mui/icons-material/Visibility'; import { Box, Tab, Tabs } from '@mui/material'; -import React, { useContext, useEffect, useState } from 'react'; import { OneVillageTable } from '../OneVillageTable'; import TabPanel from './TabPanel'; @@ -11,7 +12,7 @@ import ClassesContributionCard from './cards/ClassesContributionCard/ClassesCont import ClassesExchangesCard from './cards/ClassesExchangesCard/ClassesExchangesCard'; import StatsCard from './cards/StatsCard/StatsCard'; import BarCharts from './charts/BarCharts'; -import DashboardTable from './charts/DashboardTable'; +// import DashboardTable from './charts/DashboardTable'; import DualBarChart from './charts/DualBarChart/DualBarChart'; import PieCharts from './charts/PieCharts'; import CountriesDropdown from './filters/CountriesDropdown'; @@ -126,7 +127,7 @@ const VillageStats = () => {
- + {/* */} diff --git a/src/components/admin/dashboard-statistics/cards/ClassesExchangesCard/ClassesExchangesCard.tsx b/src/components/admin/dashboard-statistics/cards/ClassesExchangesCard/ClassesExchangesCard.tsx index 3886c661f..f1dfe70f4 100644 --- a/src/components/admin/dashboard-statistics/cards/ClassesExchangesCard/ClassesExchangesCard.tsx +++ b/src/components/admin/dashboard-statistics/cards/ClassesExchangesCard/ClassesExchangesCard.tsx @@ -1,8 +1,9 @@ +import classNames from 'classnames'; +import React from 'react'; + import ChatBubbleOutlineIcon from '@mui/icons-material/ChatBubbleOutline'; import DescriptionIcon from '@mui/icons-material/Description'; import YouTubeIcon from '@mui/icons-material/YouTube'; -import classNames from 'classnames'; -import React from 'react'; import styles from './ClassesExchangesCard.module.css'; diff --git a/src/components/admin/dashboard-statistics/cards/CommentCard/CommentCard.tsx b/src/components/admin/dashboard-statistics/cards/CommentCard/CommentCard.tsx index b4bd78bce..b7f340a85 100644 --- a/src/components/admin/dashboard-statistics/cards/CommentCard/CommentCard.tsx +++ b/src/components/admin/dashboard-statistics/cards/CommentCard/CommentCard.tsx @@ -1,6 +1,7 @@ -import EditIcon from '@mui/icons-material/Edit'; // Assurez-vous que ce package est installé ou utilisez une autre icône. import React from 'react'; +import EditIcon from '@mui/icons-material/Edit'; // Assurez-vous que ce package est installé ou utilisez une autre icône. + import styles from './CommentCard.module.css'; const CommentCard = () => { diff --git a/src/components/admin/dashboard-statistics/cards/StatsCard/StatsCard.tsx b/src/components/admin/dashboard-statistics/cards/StatsCard/StatsCard.tsx index e6274188f..b94b22639 100644 --- a/src/components/admin/dashboard-statistics/cards/StatsCard/StatsCard.tsx +++ b/src/components/admin/dashboard-statistics/cards/StatsCard/StatsCard.tsx @@ -1,6 +1,7 @@ -import Box from '@mui/material/Box'; import React from 'react'; +import Box from '@mui/material/Box'; + import styles from './StatsCard.module.css'; interface StatsCardProps { diff --git a/src/components/admin/dashboard-statistics/charts/BarCharts.tsx b/src/components/admin/dashboard-statistics/charts/BarCharts.tsx index aa0260136..12bac8635 100644 --- a/src/components/admin/dashboard-statistics/charts/BarCharts.tsx +++ b/src/components/admin/dashboard-statistics/charts/BarCharts.tsx @@ -1,7 +1,8 @@ -import { BarChart } from '@mui/x-charts/BarChart'; import classNames from 'classnames'; import React, { useState } from 'react'; +import { BarChart } from '@mui/x-charts/BarChart'; + import styles from '../styles/charts.module.css'; interface Props { diff --git a/src/components/admin/dashboard-statistics/charts/DashboardTable.tsx b/src/components/admin/dashboard-statistics/charts/DashboardTable.tsx index d5adb4a7d..f7b5ebb02 100644 --- a/src/components/admin/dashboard-statistics/charts/DashboardTable.tsx +++ b/src/components/admin/dashboard-statistics/charts/DashboardTable.tsx @@ -1,4 +1,6 @@ -import { Typography } from '@mui/material'; +import React from 'react'; + +import { TableSortLabel } from '@mui/material'; import Paper from '@mui/material/Paper'; import Table from '@mui/material/Table'; import TableBody from '@mui/material/TableBody'; @@ -6,22 +8,21 @@ import TableCell from '@mui/material/TableCell'; import TableContainer from '@mui/material/TableContainer'; import TableHead from '@mui/material/TableHead'; import TableRow from '@mui/material/TableRow'; -import { Box } from '@mui/system'; -import React from 'react'; -function createData(classroom: string, vm: string, prof: string, status: string) { - return { classroom, vm, prof, status }; -} +import type { FamiliesWithoutAccount } from 'types/statistics.type'; -const rows = [ - createData('École Robert Desnos', 'France-Canada', 'Karine Marchand', '3 semaines sans connexion'), - createData('École Jules Ferry', 'France-Canada', 'Karine Marchand', '3 semaines sans connexion'), - createData('École Claude Gelée', 'France-Canada', 'Karine Marchand', '3 semaines sans connexion'), - createData('École Louis Armand', 'France-Canada', 'Karine Marchand', 'Accumulation de brouillons'), - createData('École Louis Renard', 'France-Canada', 'Karine Marchand', 'Accumulation de brouillons'), - createData('École Maurice Ravel', 'France-Canada', 'Karine Marchand', 'Aucune connexion'), - createData('École Mirion Malle', 'France-Canada', 'Karine Marchand', 'Aucune connexion'), -]; +function createRows(data: FamiliesWithoutAccount[]): FamiliesWithoutAccountRow[] { + return data.map((row) => { + return { + id: row.student_id, + student: `${row.student_firstname} ${row.student_lastname}`, + vm: row.village_name, + classroom: row.classroom_name, + country: row.classroom_country, + creationDate: 'À venir', + }; + }); +} const FamiliesWithoutAccountHeaders = ['Nom Prénom Enfant', 'Village-Monde', 'Classe', 'Pays', 'Date de création identifiant']; @@ -47,42 +48,34 @@ export default function DashboardTable({ data }: DashboardTableProps) { } }, [data]); return ( - - - - À surveiller - - - - - - - - Classe - - - Village - Monde - - - Professeur - - - Statut - - - - - {rows.map((row, index) => ( - - {row.classroom} - {row.vm} - {row.prof} - {row.status} - + +
+ + + À surveiller : comptes non créés ({rows.length}) + + + {FamiliesWithoutAccountHeaders.map((header) => ( + <> + + {header} + + ))} - -
-
-
+ + + + {rows.map((row) => ( + + {row.student} + {row.vm} + {row.classroom} + {row.country} + {row.creationDate} + + ))} + + + ); } diff --git a/src/components/admin/dashboard-statistics/charts/HorizontalChart.tsx b/src/components/admin/dashboard-statistics/charts/HorizontalChart.tsx index f26ff46b5..869ef3d6c 100644 --- a/src/components/admin/dashboard-statistics/charts/HorizontalChart.tsx +++ b/src/components/admin/dashboard-statistics/charts/HorizontalChart.tsx @@ -2,7 +2,6 @@ import React from 'react'; import { BarChart, Bar, XAxis, YAxis, Tooltip, ResponsiveContainer, Cell } from 'recharts'; import styles from '../styles/charts.module.css'; -import { sumAllData } from '../utils/sumData'; const data = [ { country: 'FR', total: 80 }, diff --git a/src/components/admin/dashboard-statistics/charts/PieCharts.tsx b/src/components/admin/dashboard-statistics/charts/PieCharts.tsx index cb50e92d2..15caecef5 100644 --- a/src/components/admin/dashboard-statistics/charts/PieCharts.tsx +++ b/src/components/admin/dashboard-statistics/charts/PieCharts.tsx @@ -1,7 +1,8 @@ -import { PieChart } from '@mui/x-charts/PieChart'; import classNames from 'classnames'; import React from 'react'; +import { PieChart } from '@mui/x-charts/PieChart'; + import styles from '../styles/charts.module.css'; type PieChartDataItem = { diff --git a/src/components/admin/dashboard-statistics/filters/ClassroomDropdown.tsx b/src/components/admin/dashboard-statistics/filters/ClassroomDropdown.tsx index 0afcfc939..48d56e779 100644 --- a/src/components/admin/dashboard-statistics/filters/ClassroomDropdown.tsx +++ b/src/components/admin/dashboard-statistics/filters/ClassroomDropdown.tsx @@ -1,10 +1,11 @@ +import * as React from 'react'; + import Box from '@mui/material/Box'; import FormControl from '@mui/material/FormControl'; import InputLabel from '@mui/material/InputLabel'; import MenuItem from '@mui/material/MenuItem'; import type { SelectChangeEvent } from '@mui/material/Select'; import Select from '@mui/material/Select'; -import * as React from 'react'; import { getUserDisplayName } from 'src/utils'; import type { Classroom } from 'types/classroom.type'; diff --git a/src/components/admin/dashboard-statistics/filters/CountriesDropdown.tsx b/src/components/admin/dashboard-statistics/filters/CountriesDropdown.tsx index 95517d340..668a6efd2 100644 --- a/src/components/admin/dashboard-statistics/filters/CountriesDropdown.tsx +++ b/src/components/admin/dashboard-statistics/filters/CountriesDropdown.tsx @@ -1,10 +1,11 @@ +import * as React from 'react'; + import Box from '@mui/material/Box'; import FormControl from '@mui/material/FormControl'; import InputLabel from '@mui/material/InputLabel'; import MenuItem from '@mui/material/MenuItem'; import type { SelectChangeEvent } from '@mui/material/Select'; import Select from '@mui/material/Select'; -import * as React from 'react'; import type { Country } from 'types/country.type'; diff --git a/src/components/admin/dashboard-statistics/filters/Dropdown.tsx b/src/components/admin/dashboard-statistics/filters/Dropdown.tsx index 9cc50e779..2130ccf7e 100644 --- a/src/components/admin/dashboard-statistics/filters/Dropdown.tsx +++ b/src/components/admin/dashboard-statistics/filters/Dropdown.tsx @@ -1,10 +1,11 @@ +import * as React from 'react'; + import Box from '@mui/material/Box'; import FormControl from '@mui/material/FormControl'; import InputLabel from '@mui/material/InputLabel'; import MenuItem from '@mui/material/MenuItem'; import type { SelectChangeEvent } from '@mui/material/Select'; import Select from '@mui/material/Select'; -import * as React from 'react'; interface DropdownProps { data: string[]; diff --git a/src/components/admin/dashboard-statistics/filters/PhaseDropdown.tsx b/src/components/admin/dashboard-statistics/filters/PhaseDropdown.tsx index 868323933..683f5b98f 100644 --- a/src/components/admin/dashboard-statistics/filters/PhaseDropdown.tsx +++ b/src/components/admin/dashboard-statistics/filters/PhaseDropdown.tsx @@ -1,10 +1,11 @@ +import * as React from 'react'; + import Box from '@mui/material/Box'; import FormControl from '@mui/material/FormControl'; import InputLabel from '@mui/material/InputLabel'; import MenuItem from '@mui/material/MenuItem'; import type { SelectChangeEvent } from '@mui/material/Select'; import Select from '@mui/material/Select'; -import * as React from 'react'; interface PhaseDropdownProps { onPhaseChange: (phase: string) => void; diff --git a/src/components/admin/dashboard-statistics/filters/VillageDropdown.tsx b/src/components/admin/dashboard-statistics/filters/VillageDropdown.tsx index 923af2e01..ad5096274 100644 --- a/src/components/admin/dashboard-statistics/filters/VillageDropdown.tsx +++ b/src/components/admin/dashboard-statistics/filters/VillageDropdown.tsx @@ -1,10 +1,11 @@ +import * as React from 'react'; + import Box from '@mui/material/Box'; import FormControl from '@mui/material/FormControl'; import InputLabel from '@mui/material/InputLabel'; import MenuItem from '@mui/material/MenuItem'; import type { SelectChangeEvent } from '@mui/material/Select'; import Select from '@mui/material/Select'; -import * as React from 'react'; interface VillageDropdownProps { villages: { name: string; id: number }[]; diff --git a/src/components/admin/dashboard-statistics/map/DashboardWorldMap/DashboardWorldMap.tsx b/src/components/admin/dashboard-statistics/map/DashboardWorldMap/DashboardWorldMap.tsx index d5c4ff13f..cc42de7b7 100644 --- a/src/components/admin/dashboard-statistics/map/DashboardWorldMap/DashboardWorldMap.tsx +++ b/src/components/admin/dashboard-statistics/map/DashboardWorldMap/DashboardWorldMap.tsx @@ -1,7 +1,8 @@ -import CircleIcon from '@mui/icons-material/Circle'; import React from 'react'; import { ComposableMap, Geographies, Geography, ZoomableGroup } from 'react-simple-maps'; +import CircleIcon from '@mui/icons-material/Circle'; + import TooltipMouseTracker from '../TooltipMouseTracker/TooltipMouseTracker'; import styles from './DashboardWorldMap.module.css'; diff --git a/src/components/admin/dashboard-statistics/menu/PhaseDetails.tsx b/src/components/admin/dashboard-statistics/menu/PhaseDetails.tsx index ac9ce9a05..47a818ef8 100644 --- a/src/components/admin/dashboard-statistics/menu/PhaseDetails.tsx +++ b/src/components/admin/dashboard-statistics/menu/PhaseDetails.tsx @@ -1,3 +1,6 @@ +import * as React from 'react'; +import { useState } from 'react'; + import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp'; import { Accordion, @@ -11,8 +14,6 @@ import { TableRow, TableSortLabel, } from '@mui/material'; -import * as React from 'react'; -import { useState } from 'react'; import ArrowRight from 'src/svg/arrow-right.svg'; diff --git a/src/components/admin/dashboard-statistics/nav/DashboardTabs.tsx b/src/components/admin/dashboard-statistics/nav/DashboardTabs.tsx index 268598957..050108f81 100644 --- a/src/components/admin/dashboard-statistics/nav/DashboardTabs.tsx +++ b/src/components/admin/dashboard-statistics/nav/DashboardTabs.tsx @@ -1,8 +1,9 @@ +import React from 'react'; + import Box from '@mui/material/Box'; import Tab from '@mui/material/Tab'; import Tabs from '@mui/material/Tabs'; import Typography from '@mui/material/Typography'; -import React from 'react'; interface TabPanelProps { children?: React.ReactNode; diff --git a/src/components/admin/mediatheque/CardMediatheque.tsx b/src/components/admin/mediatheque/CardMediatheque.tsx index b1886cf24..e69e23caa 100644 --- a/src/components/admin/mediatheque/CardMediatheque.tsx +++ b/src/components/admin/mediatheque/CardMediatheque.tsx @@ -1,9 +1,10 @@ +import React, { useContext } from 'react'; + import { Grid } from '@mui/material'; import Card from '@mui/material/Card'; import CardContent from '@mui/material/CardContent'; import CardMedia from '@mui/material/CardMedia'; import Typography from '@mui/material/Typography'; -import React, { useContext } from 'react'; import DownloadButton from 'src/components/admin/mediatheque/DownloadButton'; import { MediaCarousel } from 'src/components/admin/mediatheque/MediaCarousel'; diff --git a/src/components/admin/mediatheque/CheckboxAdmin.tsx b/src/components/admin/mediatheque/CheckboxAdmin.tsx index 3f156ba6a..814af94f1 100644 --- a/src/components/admin/mediatheque/CheckboxAdmin.tsx +++ b/src/components/admin/mediatheque/CheckboxAdmin.tsx @@ -1,6 +1,7 @@ -import Checkbox from '@mui/material/Checkbox'; import React, { useContext } from 'react'; +import Checkbox from '@mui/material/Checkbox'; + import MediathequeContext from 'src/contexts/mediathequeContext'; import PelicoNeutre from 'src/svg/pelico/pelico_neutre.svg'; diff --git a/src/components/admin/mediatheque/DownloadButton.tsx b/src/components/admin/mediatheque/DownloadButton.tsx index f02043821..a72b11df1 100644 --- a/src/components/admin/mediatheque/DownloadButton.tsx +++ b/src/components/admin/mediatheque/DownloadButton.tsx @@ -1,12 +1,13 @@ -import SaveAltIcon from '@mui/icons-material/SaveAlt'; -import Box from '@mui/material/Box'; -import Button from '@mui/material/Button'; -import CircularProgress from '@mui/material/CircularProgress'; import { saveAs } from 'file-saver'; import JSZip from 'jszip'; import { useSnackbar } from 'notistack'; import React, { useState } from 'react'; +import SaveAltIcon from '@mui/icons-material/SaveAlt'; +import Box from '@mui/material/Box'; +import Button from '@mui/material/Button'; +import CircularProgress from '@mui/material/CircularProgress'; + import { subThemesMap, activityNumberMapper, subThemeNumberMapper } from 'src/config/mediatheque/dataFilters'; import { serializeToQueryUrl } from 'src/utils'; import { axiosRequest } from 'src/utils/axiosRequest'; diff --git a/src/components/admin/mediatheque/Filter.tsx b/src/components/admin/mediatheque/Filter.tsx index 067803e8d..2fbddc008 100644 --- a/src/components/admin/mediatheque/Filter.tsx +++ b/src/components/admin/mediatheque/Filter.tsx @@ -1,3 +1,5 @@ +import React from 'react'; + import FormControl from '@mui/material/FormControl'; import MenuItem from '@mui/material/MenuItem'; import OutlinedInput from '@mui/material/OutlinedInput'; @@ -6,7 +8,6 @@ import Select from '@mui/material/Select'; import Tooltip from '@mui/material/Tooltip'; import { useTheme } from '@mui/material/styles'; import type { Theme } from '@mui/material/styles'; -import React from 'react'; const ITEM_HEIGHT = 48; const ITEM_PADDING_TOP = 8; diff --git a/src/components/admin/mediatheque/FiltersActivities.tsx b/src/components/admin/mediatheque/FiltersActivities.tsx index afd446c27..0aeb94c44 100644 --- a/src/components/admin/mediatheque/FiltersActivities.tsx +++ b/src/components/admin/mediatheque/FiltersActivities.tsx @@ -1,3 +1,6 @@ +import React, { useEffect, useState, useContext, useCallback, useMemo } from 'react'; +import { countries } from 'server/utils/iso-3166-countries-french'; + import FormControl from '@mui/material/FormControl'; import MenuItem from '@mui/material/MenuItem'; import OutlinedInput from '@mui/material/OutlinedInput'; @@ -5,8 +8,6 @@ import type { SelectChangeEvent } from '@mui/material/Select'; import Select from '@mui/material/Select'; import { useTheme } from '@mui/material/styles'; import type { Theme } from '@mui/material/styles'; -import React, { useEffect, useState, useContext, useCallback, useMemo } from 'react'; -import { countries } from 'server/utils/iso-3166-countries-french'; import { activitiesLabel, activityNumberMapper, subThemesMap, subThemeNumberMapper } from 'src/config/mediatheque/dataFilters'; import type { UserData } from 'src/contexts/mediathequeContext'; diff --git a/src/components/admin/mediatheque/MediaCarousel.tsx b/src/components/admin/mediatheque/MediaCarousel.tsx index 32430d4b9..c254f3490 100644 --- a/src/components/admin/mediatheque/MediaCarousel.tsx +++ b/src/components/admin/mediatheque/MediaCarousel.tsx @@ -1,8 +1,9 @@ +import React, { useState } from 'react'; + import NavigateBeforeIcon from '@mui/icons-material/NavigateBefore'; import NavigateNextIcon from '@mui/icons-material/NavigateNext'; import Button from '@mui/material/Button'; import CardMedia from '@mui/material/CardMedia'; -import React, { useState } from 'react'; type Item = { type: string; diff --git a/src/components/admin/mediatheque/ModalFilter.tsx b/src/components/admin/mediatheque/ModalFilter.tsx index ce5ac3972..6fdf105ab 100644 --- a/src/components/admin/mediatheque/ModalFilter.tsx +++ b/src/components/admin/mediatheque/ModalFilter.tsx @@ -1,9 +1,10 @@ +import React, { useContext, useState } from 'react'; + import RefreshIcon from '@mui/icons-material/Refresh'; import Box from '@mui/material/Box'; import Button from '@mui/material/Button'; import IconButton from '@mui/material/IconButton'; import Modal from '@mui/material/Modal'; -import React, { useContext, useState } from 'react'; import FiltersActivities from './FiltersActivities'; import CheckboxAdmin from 'src/components/admin/mediatheque/CheckboxAdmin'; diff --git a/src/components/audio/AudioMixer/AudioMixer.tsx b/src/components/audio/AudioMixer/AudioMixer.tsx index a0a3df190..c37760507 100644 --- a/src/components/audio/AudioMixer/AudioMixer.tsx +++ b/src/components/audio/AudioMixer/AudioMixer.tsx @@ -1,6 +1,7 @@ -import { Button } from '@mui/material'; import React from 'react'; +import { Button } from '@mui/material'; + import AudioMixerTrackControl from '../AudioMixerTrackControls/AudioMixerTrackControl'; import styles from './AudioMixer.module.css'; import { toTime } from 'src/utils/toTime'; diff --git a/src/components/audio/AudioMixerTrackControls/AudioMixerTrackControl.tsx b/src/components/audio/AudioMixerTrackControls/AudioMixerTrackControl.tsx index e600c8a84..7a159f850 100644 --- a/src/components/audio/AudioMixerTrackControls/AudioMixerTrackControl.tsx +++ b/src/components/audio/AudioMixerTrackControls/AudioMixerTrackControl.tsx @@ -1,6 +1,7 @@ +import React from 'react'; + import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined'; import { Slider, Tooltip } from '@mui/material'; -import React from 'react'; import type { AudioMixerTrack } from '../AudioMixer/AudioMixer'; import styles from './AudioMixerTrackControl.module.css'; diff --git a/src/components/audio/AudioPlayer/AudioPlayer.tsx b/src/components/audio/AudioPlayer/AudioPlayer.tsx index 2cee651d6..409ef0766 100644 --- a/src/components/audio/AudioPlayer/AudioPlayer.tsx +++ b/src/components/audio/AudioPlayer/AudioPlayer.tsx @@ -1,7 +1,8 @@ -import { Alert, CircularProgress } from '@mui/material'; import * as React from 'react'; import { useQuery } from 'react-query'; +import { Alert, CircularProgress } from '@mui/material'; + import { primaryColor } from 'src/styles/variables.const'; import { axiosRequest } from 'src/utils/axiosRequest'; diff --git a/src/components/audio/DraggableTrack.tsx b/src/components/audio/DraggableTrack.tsx index 39e6ab9b9..56a614d30 100644 --- a/src/components/audio/DraggableTrack.tsx +++ b/src/components/audio/DraggableTrack.tsx @@ -1,6 +1,7 @@ +import React from 'react'; + import MicNoneIcon from '@mui/icons-material/MicNone'; import MusicNoteIcon from '@mui/icons-material/MusicNote'; -import React from 'react'; import { useDragHandler } from 'src/hooks/useDragHandler'; import { clamp } from 'src/utils'; diff --git a/src/components/audio/VolumeControls/VolumeControl.tsx b/src/components/audio/VolumeControls/VolumeControl.tsx index e849d6be3..ac1a0a571 100644 --- a/src/components/audio/VolumeControls/VolumeControl.tsx +++ b/src/components/audio/VolumeControls/VolumeControl.tsx @@ -1,8 +1,9 @@ +import React from 'react'; +import type { ReactElement } from 'react'; + import VolumeUp from '@mui/icons-material/VolumeUp'; import Slider from '@mui/material/Slider'; import Stack from '@mui/material/Stack'; -import React from 'react'; -import type { ReactElement } from 'react'; interface VolumeControlProps { icon?: ReactElement; diff --git a/src/components/buttons/AddAudioButton.tsx b/src/components/buttons/AddAudioButton.tsx index b1cf89cf2..a7d50abf0 100644 --- a/src/components/buttons/AddAudioButton.tsx +++ b/src/components/buttons/AddAudioButton.tsx @@ -1,6 +1,7 @@ +import React from 'react'; + import Add from '@mui/icons-material/Add'; import { Button } from '@mui/material'; -import React from 'react'; interface AddAudioButtonProps { onClick: () => void; diff --git a/src/components/buttons/CustomRadio.tsx b/src/components/buttons/CustomRadio.tsx index a5c7af1bf..3e8af37ce 100644 --- a/src/components/buttons/CustomRadio.tsx +++ b/src/components/buttons/CustomRadio.tsx @@ -1,6 +1,7 @@ +import * as React from 'react'; + import FiberManualRecordIcon from '@mui/icons-material/FiberManualRecord'; import { Radio } from '@mui/material'; -import * as React from 'react'; import { errorColor, successColor } from 'src/styles/variables.const'; diff --git a/src/components/buttons/DeleteButton.tsx b/src/components/buttons/DeleteButton.tsx index 82a09af8b..5b0b57845 100644 --- a/src/components/buttons/DeleteButton.tsx +++ b/src/components/buttons/DeleteButton.tsx @@ -1,7 +1,8 @@ +import React from 'react'; + import DeleteIcon from '@mui/icons-material/Delete'; import IconButton from '@mui/material/IconButton'; import type { Theme } from '@mui/material/styles'; -import React from 'react'; import { Modal } from 'src/components/Modal'; diff --git a/src/components/buttons/EditButton.tsx b/src/components/buttons/EditButton.tsx index 10ede9c4d..01a4bc10b 100644 --- a/src/components/buttons/EditButton.tsx +++ b/src/components/buttons/EditButton.tsx @@ -1,9 +1,10 @@ +import React from 'react'; + import EditIcon from '@mui/icons-material/Edit'; import type { ButtonProps } from '@mui/material'; import IconButton from '@mui/material/IconButton'; import Tooltip from '@mui/material/Tooltip'; import type { Theme } from '@mui/material/styles'; -import React from 'react'; import { successColor, errorColor, warningColor } from 'src/styles/variables.const'; diff --git a/src/components/buttons/GameResponseButton.tsx b/src/components/buttons/GameResponseButton.tsx index b4704b6e1..520c2a9cc 100644 --- a/src/components/buttons/GameResponseButton.tsx +++ b/src/components/buttons/GameResponseButton.tsx @@ -1,6 +1,7 @@ -import { Button, Stack, Typography } from '@mui/material'; import React, { useState, useCallback } from 'react'; +import { Button, Stack, Typography } from '@mui/material'; + import ArrowRight from 'src/svg/arrow-right.svg'; type ResponseButtonProps = { diff --git a/src/components/buttons/HelpButton.tsx b/src/components/buttons/HelpButton.tsx index 28c622d89..e62c49967 100644 --- a/src/components/buttons/HelpButton.tsx +++ b/src/components/buttons/HelpButton.tsx @@ -1,6 +1,7 @@ +import React from 'react'; + import type { ButtonProps } from '@mui/material'; import Button from '@mui/material/Button'; -import React from 'react'; import { helpColor, helpColorDarker } from 'src/styles/variables.const'; import PelicoSearch from 'src/svg/pelico/pelico-search.svg'; diff --git a/src/components/buttons/QuestionButton.tsx b/src/components/buttons/QuestionButton.tsx index e8bf0bb0e..260e23556 100644 --- a/src/components/buttons/QuestionButton.tsx +++ b/src/components/buttons/QuestionButton.tsx @@ -1,6 +1,7 @@ +import React from 'react'; + import HelpIcon from '@mui/icons-material/Help'; import Popover from '@mui/material/Popover'; -import React from 'react'; interface QuestionButtonProps { helpMessage: string | React.ReactNode | React.ReactNodeArray; diff --git a/src/components/buttons/RedButton.tsx b/src/components/buttons/RedButton.tsx index 8ebaed67a..00c629a12 100644 --- a/src/components/buttons/RedButton.tsx +++ b/src/components/buttons/RedButton.tsx @@ -1,6 +1,7 @@ +import * as React from 'react'; + import type { ButtonProps } from '@mui/material/Button'; import Button from '@mui/material/Button'; -import * as React from 'react'; import { errorColor, errorColorDarker } from 'src/styles/variables.const'; diff --git a/src/components/buttons/ThemeChoiceButton.tsx b/src/components/buttons/ThemeChoiceButton.tsx index 5a14559b3..d179e55cf 100644 --- a/src/components/buttons/ThemeChoiceButton.tsx +++ b/src/components/buttons/ThemeChoiceButton.tsx @@ -1,6 +1,7 @@ -import { Box, ButtonBase } from '@mui/material'; import React from 'react'; +import { Box, ButtonBase } from '@mui/material'; + import ArrowRight from 'src/svg/arrow-right.svg'; interface ThemeChoiceButtonProps { diff --git a/src/components/game/DisplayGameById.tsx b/src/components/game/DisplayGameById.tsx index c474ea04c..263cddaa0 100644 --- a/src/components/game/DisplayGameById.tsx +++ b/src/components/game/DisplayGameById.tsx @@ -1,10 +1,11 @@ -import ArrowBackIcon from '@mui/icons-material/ArrowBack'; -import { Box, Button, Grid, Box, Button, Grid } from '@mui/material'; import Image from 'next/image'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React, { useState, useCallback, useMemo, useContext } from 'react'; +import ArrowBackIcon from '@mui/icons-material/ArrowBack'; +import { Box, Button, Grid } from '@mui/material'; + import { KeepRatio } from '../KeepRatio'; import { ActivityComments } from '../activities/ActivityComments'; import { useOneGameById } from 'src/api/game/game.getOneGameById'; diff --git a/src/components/game/List.tsx b/src/components/game/List.tsx index 34b99785e..d5c22cfa1 100644 --- a/src/components/game/List.tsx +++ b/src/components/game/List.tsx @@ -1,11 +1,12 @@ +import React from 'react'; +import ReactPlayer from 'react-player'; + import { Grid, Link } from '@mui/material'; import Button from '@mui/material/Button'; import Card from '@mui/material/Card'; import CardMedia from '@mui/material/CardMedia'; import ImageListItem from '@mui/material/ImageListItem'; import ImageListItemBar from '@mui/material/ImageListItemBar'; -import React from 'react'; -import ReactPlayer from 'react-player'; import { useAllStandardGameByType } from 'src/api/game/game.getAllBySubtype'; import { useAbleToPlayStandardGame } from 'src/api/game/game.getAvailable'; diff --git a/src/components/game/Play.tsx b/src/components/game/Play.tsx index 1c43e1e06..3945bc819 100644 --- a/src/components/game/Play.tsx +++ b/src/components/game/Play.tsx @@ -1,4 +1,6 @@ // import { Grid } from '@mui/material'; +import React from 'react'; + import FormControl from '@mui/material/FormControl'; import FormControlLabel from '@mui/material/FormControlLabel'; import InputLabel from '@mui/material/InputLabel'; @@ -6,7 +8,6 @@ import Radio from '@mui/material/Radio'; import RadioGroup from '@mui/material/RadioGroup'; import Select from '@mui/material/Select'; import TextField from '@mui/material/TextField'; -import React from 'react'; import { GAME_FIELDS_CONFIG } from 'src/config/games/game'; import { InputTypeEnum } from 'types/game.type'; diff --git a/src/components/game/Previsualisation.tsx b/src/components/game/Previsualisation.tsx index fb4e0d966..a855afce2 100644 --- a/src/components/game/Previsualisation.tsx +++ b/src/components/game/Previsualisation.tsx @@ -1,9 +1,10 @@ -import { FormControlLabel, Grid, Radio, RadioGroup } from '@mui/material'; import Image from 'next/image'; import router from 'next/router'; import React, { useContext } from 'react'; import ReactPlayer from 'react-player'; +import { FormControlLabel, Grid, Radio, RadioGroup } from '@mui/material'; + import { CustomRadio } from '../buttons/CustomRadio'; import { EditButton } from '../buttons/EditButton'; import { GameContext } from 'src/contexts/gameContext'; diff --git a/src/components/game/componentGameMapping/GameField.tsx b/src/components/game/componentGameMapping/GameField.tsx index 1cf7cd9bc..9e8c62581 100644 --- a/src/components/game/componentGameMapping/GameField.tsx +++ b/src/components/game/componentGameMapping/GameField.tsx @@ -1,6 +1,7 @@ -import { TextField } from '@mui/material'; import React, { useContext, useState } from 'react'; +import { TextField } from '@mui/material'; + import { GameContext } from 'src/contexts/gameContext'; import type { inputType } from 'types/game.type'; diff --git a/src/components/game/componentGameMapping/GameMedia.tsx b/src/components/game/componentGameMapping/GameMedia.tsx index 3866d9885..c9853a633 100644 --- a/src/components/game/componentGameMapping/GameMedia.tsx +++ b/src/components/game/componentGameMapping/GameMedia.tsx @@ -1,9 +1,10 @@ -import AddIcon from '@mui/icons-material/Add'; -import { ButtonBase } from '@mui/material'; import Image from 'next/image'; import React, { useContext } from 'react'; import ReactPlayer from 'react-player'; +import AddIcon from '@mui/icons-material/Add'; +import { ButtonBase } from '@mui/material'; + import { KeepRatio } from 'src/components/KeepRatio'; import { ImageModal } from 'src/components/activities/content/editors/ImageEditor/ImageModal'; import { VideoModals } from 'src/components/activities/content/editors/VideoEditor/VideoModals'; diff --git a/src/components/game/componentGameMapping/GameRadio.tsx b/src/components/game/componentGameMapping/GameRadio.tsx index 7fc50ea5c..d6bb12400 100644 --- a/src/components/game/componentGameMapping/GameRadio.tsx +++ b/src/components/game/componentGameMapping/GameRadio.tsx @@ -1,6 +1,7 @@ -import { RadioGroup, Radio, FormControlLabel } from '@mui/material'; import React, { useContext } from 'react'; +import { RadioGroup, Radio, FormControlLabel } from '@mui/material'; + import { GameContext } from 'src/contexts/gameContext'; import type { inputType } from 'types/game.type'; diff --git a/src/components/game/componentGameMapping/GameSelect.tsx b/src/components/game/componentGameMapping/GameSelect.tsx index 801c83990..16f762f6c 100644 --- a/src/components/game/componentGameMapping/GameSelect.tsx +++ b/src/components/game/componentGameMapping/GameSelect.tsx @@ -1,6 +1,7 @@ -import { Autocomplete, FormControl, TextField } from '@mui/material'; import React, { useContext, useEffect, useState } from 'react'; +import { Autocomplete, FormControl, TextField } from '@mui/material'; + import { SelectTypeMappingMethode, keyMapping } from 'src/config/games/game'; import { GameContext } from 'src/contexts/gameContext'; import type { Currency } from 'types/currency.type'; diff --git a/src/components/h5p/H5pEditor.tsx b/src/components/h5p/H5pEditor.tsx index b38249fd0..5d2dc5a05 100644 --- a/src/components/h5p/H5pEditor.tsx +++ b/src/components/h5p/H5pEditor.tsx @@ -1,7 +1,8 @@ import { H5PEditorUI } from '@lumieducation/h5p-react'; -import { Button } from '@mui/material'; import * as React from 'react'; +import { Button } from '@mui/material'; + import { getH5pContent } from 'src/api/h5p/h5p-content.get'; import { patchH5pContent } from 'src/api/h5p/h5p-content.patch'; import { postH5pContent } from 'src/api/h5p/h5p-content.post'; diff --git a/src/components/mon-compte/NotifCheckbox.tsx b/src/components/mon-compte/NotifCheckbox.tsx index 745922d22..69c9483e6 100644 --- a/src/components/mon-compte/NotifCheckbox.tsx +++ b/src/components/mon-compte/NotifCheckbox.tsx @@ -1,8 +1,9 @@ -import Button from '@mui/material/Button'; -import Checkbox from '@mui/material/Checkbox'; import { useSnackbar } from 'notistack'; import React, { useContext } from 'react'; +import Button from '@mui/material/Button'; +import Checkbox from '@mui/material/Checkbox'; + import { usePutNotifications } from 'src/api/notifications/notifications.put'; import { UserContext } from 'src/contexts/userContext'; diff --git a/src/components/mon-compte/PanelInput.tsx b/src/components/mon-compte/PanelInput.tsx index 673ac835c..53b066763 100644 --- a/src/components/mon-compte/PanelInput.tsx +++ b/src/components/mon-compte/PanelInput.tsx @@ -1,7 +1,8 @@ -import TextField from '@mui/material/TextField'; import type { CSSProperties } from 'react'; import React from 'react'; +import TextField from '@mui/material/TextField'; + interface PanelInputProps { value: string | undefined; defaultValue?: string; diff --git a/src/components/selectors/CountrySelector.tsx b/src/components/selectors/CountrySelector.tsx index 832a7ba61..c8072bc73 100644 --- a/src/components/selectors/CountrySelector.tsx +++ b/src/components/selectors/CountrySelector.tsx @@ -1,7 +1,8 @@ +import React from 'react'; + import { Box } from '@mui/material'; import Autocomplete from '@mui/material/Autocomplete'; import TextField from '@mui/material/TextField'; -import React from 'react'; import { useCountries } from 'src/services/useCountries'; import { countryToFlag } from 'src/utils'; diff --git a/src/components/selectors/LanguageSelector.tsx b/src/components/selectors/LanguageSelector.tsx index b09e49ead..173a5b8fc 100644 --- a/src/components/selectors/LanguageSelector.tsx +++ b/src/components/selectors/LanguageSelector.tsx @@ -1,7 +1,8 @@ +import React from 'react'; + import { Box } from '@mui/material'; import Autocomplete from '@mui/material/Autocomplete'; import TextField from '@mui/material/TextField'; -import React from 'react'; import { useLanguages } from 'src/services/useLanguages'; import type { Language } from 'types/language.type'; diff --git a/src/components/selectors/MimicSelector.tsx b/src/components/selectors/MimicSelector.tsx index 3fd349552..6e94a57c9 100644 --- a/src/components/selectors/MimicSelector.tsx +++ b/src/components/selectors/MimicSelector.tsx @@ -1,8 +1,9 @@ -import { TextField, Grid, Button } from '@mui/material'; import type { ChangeEventHandler } from 'react'; import React from 'react'; import ReactPlayer from 'react-player'; +import { TextField, Grid, Button } from '@mui/material'; + import { Base } from 'src/components/Base'; import { StepsButton } from 'src/components/StepsButtons'; import { VideoModals } from 'src/components/activities/content/editors/VideoEditor/VideoModals'; diff --git a/src/components/selectors/MultipleCountrySelector.tsx b/src/components/selectors/MultipleCountrySelector.tsx index fcf9991c9..a95920ab1 100644 --- a/src/components/selectors/MultipleCountrySelector.tsx +++ b/src/components/selectors/MultipleCountrySelector.tsx @@ -1,6 +1,7 @@ +import React from 'react'; + import Autocomplete from '@mui/material/Autocomplete'; import TextField from '@mui/material/TextField'; -import React from 'react'; import { useCountries } from 'src/services/useCountries'; import type { Country } from 'types/country.type'; diff --git a/src/components/selectors/MultipleCurrencySelector.tsx b/src/components/selectors/MultipleCurrencySelector.tsx index 84f3b1d16..4069a41dc 100644 --- a/src/components/selectors/MultipleCurrencySelector.tsx +++ b/src/components/selectors/MultipleCurrencySelector.tsx @@ -1,6 +1,7 @@ +import React from 'react'; + import Autocomplete from '@mui/material/Autocomplete'; import TextField from '@mui/material/TextField'; -import React from 'react'; import { useCurrencies } from 'src/services/useCurrencies'; import type { Currency } from 'types/currency.type'; diff --git a/src/components/selectors/MultipleLanguageSelector.tsx b/src/components/selectors/MultipleLanguageSelector.tsx index b02b395df..aef40877f 100644 --- a/src/components/selectors/MultipleLanguageSelector.tsx +++ b/src/components/selectors/MultipleLanguageSelector.tsx @@ -1,6 +1,7 @@ +import React from 'react'; + import Autocomplete from '@mui/material/Autocomplete'; import TextField from '@mui/material/TextField'; -import React from 'react'; import { useLanguages } from 'src/services/useLanguages'; import type { Language } from 'types/language.type'; diff --git a/src/components/storyPictureWheel/storyPictureWheel.tsx b/src/components/storyPictureWheel/storyPictureWheel.tsx index 8c6bc66e0..c62824a68 100644 --- a/src/components/storyPictureWheel/storyPictureWheel.tsx +++ b/src/components/storyPictureWheel/storyPictureWheel.tsx @@ -1,8 +1,9 @@ +import classNames from 'classnames'; +import React from 'react'; + import { Grid, Typography, CardMedia, Tooltip } from '@mui/material'; import Box from '@mui/material/Box'; import Paper from '@mui/material/Paper'; -import classNames from 'classnames'; -import React from 'react'; import { useImageStories } from 'src/services/useImagesStory'; import SlotMachineHandle from 'src/svg/story-activity/slot-machine-handle.svg'; diff --git a/src/components/table/CollapsibleTable.tsx b/src/components/table/CollapsibleTable.tsx index fc9487690..a27c57ed2 100644 --- a/src/components/table/CollapsibleTable.tsx +++ b/src/components/table/CollapsibleTable.tsx @@ -1,6 +1,9 @@ // import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown'; // import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp'; +import * as React from 'react'; +import { useContext, useEffect, useState } from 'react'; + import { Button, Checkbox } from '@mui/material'; import Box from '@mui/material/Box'; // import Collapse from '@mui/material/Collapse'; @@ -12,8 +15,6 @@ import TableCell from '@mui/material/TableCell'; import TableContainer from '@mui/material/TableContainer'; import TableHead from '@mui/material/TableHead'; import TableRow from '@mui/material/TableRow'; -import * as React from 'react'; -import { useContext, useEffect, useState } from 'react'; // import { DeleteButton } from '../buttons/DeleteButton'; // import { deleteUserStudentRelation } from 'src/api/student/student.delete'; diff --git a/src/contexts/activityContext.tsx b/src/contexts/activityContext.tsx index b31f08c82..48aa8b4d0 100644 --- a/src/contexts/activityContext.tsx +++ b/src/contexts/activityContext.tsx @@ -1,8 +1,9 @@ -import { Card, CircularProgress } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; import { useQueryClient } from 'react-query'; +import { Card, CircularProgress } from '@mui/material'; + import { UserContext } from './userContext'; import { VillageContext } from './villageContext'; import { Modal } from 'src/components/Modal'; diff --git a/src/contexts/classroomContext.tsx b/src/contexts/classroomContext.tsx index 6a1fe0dbf..3ec6b9cc6 100644 --- a/src/contexts/classroomContext.tsx +++ b/src/contexts/classroomContext.tsx @@ -1,6 +1,7 @@ -import { Card, CircularProgress } from '@mui/material'; import React from 'react'; +import { Card, CircularProgress } from '@mui/material'; + import { UserContext } from './userContext'; import { VillageContext } from './villageContext'; import { primaryColor } from 'src/styles/variables.const'; diff --git a/src/contexts/villageContext.tsx b/src/contexts/villageContext.tsx index cd6687387..6ebe8716f 100644 --- a/src/contexts/villageContext.tsx +++ b/src/contexts/villageContext.tsx @@ -1,13 +1,14 @@ +import Link from 'next/link'; +import { useRouter } from 'next/router'; +import { useSnackbar } from 'notistack'; +import React, { useCallback } from 'react'; + import Button from '@mui/material/Button'; import Divider from '@mui/material/Divider'; import FormControl from '@mui/material/FormControl'; import InputLabel from '@mui/material/InputLabel'; import MenuItem from '@mui/material/MenuItem'; import Select from '@mui/material/Select'; -import Link from 'next/link'; -import { useRouter } from 'next/router'; -import { useSnackbar } from 'notistack'; -import React, { useCallback } from 'react'; import { UserContext } from './userContext'; import { Modal } from 'src/components/Modal'; diff --git a/src/pages/404.tsx b/src/pages/404.tsx index b643279b5..8b34bdcec 100644 --- a/src/pages/404.tsx +++ b/src/pages/404.tsx @@ -1,7 +1,8 @@ -import Button from '@mui/material/Button'; import Link from 'next/link'; import React from 'react'; +import Button from '@mui/material/Button'; + import { KeepRatio } from 'src/components/KeepRatio'; import PelicoSearch from 'src/svg/pelico/pelico-search.svg'; diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 07af28355..e6c0e3071 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -16,9 +16,6 @@ import 'src/styles/statistic.scss'; import type { EmotionCache } from '@emotion/react'; import { CacheProvider } from '@emotion/react'; -import { Container } from '@mui/material'; -import CssBaseline from '@mui/material/CssBaseline'; -import { ThemeProvider } from '@mui/material/styles'; import axios from 'axios'; import type { Request } from 'express'; import App from 'next/app'; @@ -29,6 +26,10 @@ import NProgress from 'nprogress'; import React, { useState } from 'react'; import { QueryClient, QueryClientProvider } from 'react-query'; +import { Container } from '@mui/material'; +import CssBaseline from '@mui/material/CssBaseline'; +import { ThemeProvider } from '@mui/material/styles'; + import { Header } from 'src/components/Header'; import { WelcomeModal } from 'src/components/WelcomeModal'; import { AdminHeader } from 'src/components/admin/AdminHeader'; diff --git a/src/pages/_error.tsx b/src/pages/_error.tsx index 335aa18f1..ab2decd51 100644 --- a/src/pages/_error.tsx +++ b/src/pages/_error.tsx @@ -1,8 +1,9 @@ -import { Button } from '@mui/material'; import type { NextPageContext } from 'next'; import Link from 'next/link'; import React from 'react'; +import { Button } from '@mui/material'; + import { Base } from 'src/components/Base'; const ErrorPage = () => { diff --git a/src/pages/activite/[id].tsx b/src/pages/activite/[id].tsx index 24bd18e54..76457eccd 100644 --- a/src/pages/activite/[id].tsx +++ b/src/pages/activite/[id].tsx @@ -1,8 +1,9 @@ -import ChevronRightIcon from '@mui/icons-material/ChevronRight'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React, { useContext } from 'react'; +import ChevronRightIcon from '@mui/icons-material/ChevronRight'; + import { isEnigme } from 'src/activity-types/anyActivity'; import { Base } from 'src/components/Base'; import { RightNavigation } from 'src/components/accueil/RightNavigation'; diff --git a/src/pages/admin/analytics.tsx b/src/pages/admin/analytics.tsx index 6c50888dc..e411246d6 100644 --- a/src/pages/admin/analytics.tsx +++ b/src/pages/admin/analytics.tsx @@ -1,9 +1,10 @@ -import { Paper, Grid } from '@mui/material'; -import MaterialLink from '@mui/material/Link'; import Image from 'next/image'; import Link from 'next/link'; import React from 'react'; +import { Paper, Grid } from '@mui/material'; +import MaterialLink from '@mui/material/Link'; + import { BarWidget } from 'src/components/admin/analytics/BarWidget'; import { TimePicker, getToday } from 'src/components/admin/analytics/TimePicker'; import { TimeserieWidget } from 'src/components/admin/analytics/TimeserieWidget'; diff --git a/src/pages/admin/featureFlag.tsx b/src/pages/admin/featureFlag.tsx index 24a03feb9..789916edb 100644 --- a/src/pages/admin/featureFlag.tsx +++ b/src/pages/admin/featureFlag.tsx @@ -1,3 +1,7 @@ +import { useSnackbar } from 'notistack'; +import React, { useState, useMemo } from 'react'; +import { useQueryClient } from 'react-query'; + import { Button, Table, @@ -20,9 +24,6 @@ import { FormControl, } from '@mui/material'; import type { SelectChangeEvent } from '@mui/material/Select'; -import { useSnackbar } from 'notistack'; -import React, { useState, useMemo } from 'react'; -import { useQueryClient } from 'react-query'; import { useFeatureFlags } from 'src/api/featureFlag/featureFlag.get'; import { useUsers } from 'src/api/user/user.list'; diff --git a/src/pages/admin/h5p/edit/[id].tsx b/src/pages/admin/h5p/edit/[id].tsx index aa8aab939..70f3db650 100644 --- a/src/pages/admin/h5p/edit/[id].tsx +++ b/src/pages/admin/h5p/edit/[id].tsx @@ -1,12 +1,13 @@ -import NavigateNextIcon from '@mui/icons-material/NavigateNext'; -import { Breadcrumbs, Button } from '@mui/material'; -import MaterialLink from '@mui/material/Link'; import Link from 'next/link'; import { useRouter } from 'next/router'; import { useSnackbar } from 'notistack'; import * as React from 'react'; import { useQueryClient } from 'react-query'; +import NavigateNextIcon from '@mui/icons-material/NavigateNext'; +import { Breadcrumbs, Button } from '@mui/material'; +import MaterialLink from '@mui/material/Link'; + import { useH5pContentList } from 'src/api/h5p/h5p-content.list'; import { AdminTile } from 'src/components/admin/AdminTile'; import { H5pEditor } from 'src/components/h5p'; diff --git a/src/pages/admin/h5p/index.tsx b/src/pages/admin/h5p/index.tsx index d1cb2c8db..a2747fc23 100644 --- a/src/pages/admin/h5p/index.tsx +++ b/src/pages/admin/h5p/index.tsx @@ -1,14 +1,15 @@ -import AddCircleIcon from '@mui/icons-material/AddCircle'; -import DeleteIcon from '@mui/icons-material/Delete'; -import EditIcon from '@mui/icons-material/Edit'; -import { Button, NoSsr, IconButton, Tooltip } from '@mui/material'; -import MaterialLink from '@mui/material/Link'; import Link from 'next/link'; import { useRouter } from 'next/router'; import { useSnackbar } from 'notistack'; import * as React from 'react'; import { useQueryClient } from 'react-query'; +import AddCircleIcon from '@mui/icons-material/AddCircle'; +import DeleteIcon from '@mui/icons-material/Delete'; +import EditIcon from '@mui/icons-material/Edit'; +import { Button, NoSsr, IconButton, Tooltip } from '@mui/material'; +import MaterialLink from '@mui/material/Link'; + import { useDeleteH5pContentMutation } from 'src/api/h5p/h5p-content.delete'; import { useH5pContentList } from 'src/api/h5p/h5p-content.list'; import { Modal } from 'src/components/Modal'; diff --git a/src/pages/admin/h5p/new.tsx b/src/pages/admin/h5p/new.tsx index 4a1df4831..f12db71e6 100644 --- a/src/pages/admin/h5p/new.tsx +++ b/src/pages/admin/h5p/new.tsx @@ -1,12 +1,13 @@ -import NavigateNextIcon from '@mui/icons-material/NavigateNext'; -import { Breadcrumbs, Button } from '@mui/material'; -import MaterialLink from '@mui/material/Link'; import Link from 'next/link'; import { useRouter } from 'next/router'; import { useSnackbar } from 'notistack'; import * as React from 'react'; import { useQueryClient } from 'react-query'; +import NavigateNextIcon from '@mui/icons-material/NavigateNext'; +import { Breadcrumbs, Button } from '@mui/material'; +import MaterialLink from '@mui/material/Link'; + import { AdminTile } from 'src/components/admin/AdminTile'; import { H5pEditor } from 'src/components/h5p'; diff --git a/src/pages/admin/newportal/contenulibre/2/index.tsx b/src/pages/admin/newportal/contenulibre/2/index.tsx index cb61602e2..6c1c69b2b 100644 --- a/src/pages/admin/newportal/contenulibre/2/index.tsx +++ b/src/pages/admin/newportal/contenulibre/2/index.tsx @@ -1,8 +1,9 @@ -import { TextField, Switch, Button } from '@mui/material'; import Image from 'next/image'; import { useRouter } from 'next/router'; import React from 'react'; +import { TextField, Switch, Button } from '@mui/material'; + import Layout from '../layout'; import { isFreeContent } from 'src/activity-types/anyActivity'; import { getImage } from 'src/activity-types/freeContent.constants'; diff --git a/src/pages/admin/newportal/contenulibre/3/index.tsx b/src/pages/admin/newportal/contenulibre/3/index.tsx index 07321c64e..a646c8f32 100644 --- a/src/pages/admin/newportal/contenulibre/3/index.tsx +++ b/src/pages/admin/newportal/contenulibre/3/index.tsx @@ -1,11 +1,12 @@ -import Backdrop from '@mui/material/Backdrop'; -import Button from '@mui/material/Button'; -import CircularProgress from '@mui/material/CircularProgress'; import classNames from 'classnames'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; +import Backdrop from '@mui/material/Backdrop'; +import Button from '@mui/material/Button'; +import CircularProgress from '@mui/material/CircularProgress'; + import Layout from '../layout'; import { isFreeContent } from 'src/activity-types/anyActivity'; import type { FreeContentData } from 'src/activity-types/freeContent.types'; diff --git a/src/pages/admin/newportal/contenulibre/edit/2/[id]/index.tsx b/src/pages/admin/newportal/contenulibre/edit/2/[id]/index.tsx index 02c9cedab..1de84903a 100644 --- a/src/pages/admin/newportal/contenulibre/edit/2/[id]/index.tsx +++ b/src/pages/admin/newportal/contenulibre/edit/2/[id]/index.tsx @@ -1,8 +1,9 @@ -import { TextField, Switch, Button } from '@mui/material'; import Image from 'next/image'; import { useRouter } from 'next/router'; import React from 'react'; +import { TextField, Switch, Button } from '@mui/material'; + import Layout from '../../../layout'; import { getImage } from 'src/activity-types/freeContent.constants'; import type { FreeContentData } from 'src/activity-types/freeContent.types'; diff --git a/src/pages/admin/newportal/contenulibre/edit/3/[id]/index.tsx b/src/pages/admin/newportal/contenulibre/edit/3/[id]/index.tsx index 4e4c00aab..b7bc581c9 100644 --- a/src/pages/admin/newportal/contenulibre/edit/3/[id]/index.tsx +++ b/src/pages/admin/newportal/contenulibre/edit/3/[id]/index.tsx @@ -1,10 +1,11 @@ -import Backdrop from '@mui/material/Backdrop'; -import Button from '@mui/material/Button'; -import CircularProgress from '@mui/material/CircularProgress'; import classNames from 'classnames'; import { useRouter } from 'next/router'; import React from 'react'; +import Backdrop from '@mui/material/Backdrop'; +import Button from '@mui/material/Button'; +import CircularProgress from '@mui/material/CircularProgress'; + import Layout from '../../../layout'; import { useGetOneActivityById } from 'src/api/activities/activities.getOneById'; import { Base } from 'src/components/Base'; diff --git a/src/pages/admin/newportal/create/index.tsx b/src/pages/admin/newportal/create/index.tsx index 610d4f755..0e95c790e 100644 --- a/src/pages/admin/newportal/create/index.tsx +++ b/src/pages/admin/newportal/create/index.tsx @@ -1,8 +1,9 @@ -import { List, ListItem, ListItemIcon, ListItemText } from '@mui/material'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React, { useEffect } from 'react'; +import { List, ListItem, ListItemIcon, ListItemText } from '@mui/material'; + import { UserContext } from 'src/contexts/userContext'; import { VillageContext } from 'src/contexts/villageContext'; import { useActivity } from 'src/hooks/useActivity'; diff --git a/src/pages/admin/newportal/create/parametrer-hymne/1.tsx b/src/pages/admin/newportal/create/parametrer-hymne/1.tsx index f1be76694..28cc4d452 100644 --- a/src/pages/admin/newportal/create/parametrer-hymne/1.tsx +++ b/src/pages/admin/newportal/create/parametrer-hymne/1.tsx @@ -1,8 +1,9 @@ +import { useRouter } from 'next/router'; +import React from 'react'; + import { Box } from '@mui/material'; import Backdrop from '@mui/material/Backdrop'; import CircularProgress from '@mui/material/CircularProgress'; -import { useRouter } from 'next/router'; -import React from 'react'; import styles from '../../../../../styles/parametrer-hymne.module.css'; import { DEFAULT_ANTHEM_DATA } from 'src/activity-types/anthem.constants'; diff --git a/src/pages/admin/newportal/create/parametrer-hymne/2.tsx b/src/pages/admin/newportal/create/parametrer-hymne/2.tsx index 62810cc96..abdaea358 100644 --- a/src/pages/admin/newportal/create/parametrer-hymne/2.tsx +++ b/src/pages/admin/newportal/create/parametrer-hymne/2.tsx @@ -1,8 +1,9 @@ -import Backdrop from '@mui/material/Backdrop'; -import CircularProgress from '@mui/material/CircularProgress'; import { useRouter } from 'next/router'; import React from 'react'; +import Backdrop from '@mui/material/Backdrop'; +import CircularProgress from '@mui/material/CircularProgress'; + import styles from '../../../../../styles/parametrer-hymne.module.css'; import { postMixAudio } from 'src/api/audio/audio-mix.post'; import { deleteAudio } from 'src/api/audio/audio.delete'; diff --git a/src/pages/admin/newportal/create/parametrer-hymne/3.tsx b/src/pages/admin/newportal/create/parametrer-hymne/3.tsx index 7a47e79a3..0ffafaabc 100644 --- a/src/pages/admin/newportal/create/parametrer-hymne/3.tsx +++ b/src/pages/admin/newportal/create/parametrer-hymne/3.tsx @@ -1,7 +1,8 @@ -import { ButtonBase, Card } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; +import { ButtonBase, Card } from '@mui/material'; + import styles from '../../../../../styles/parametrer-hymne.module.css'; import { isAnthem } from 'src/activity-types/anyActivity'; import { PageLayout } from 'src/components/PageLayout'; diff --git a/src/pages/admin/newportal/create/parametrer-hymne/4.tsx b/src/pages/admin/newportal/create/parametrer-hymne/4.tsx index 36e8c6e78..1414a5b02 100644 --- a/src/pages/admin/newportal/create/parametrer-hymne/4.tsx +++ b/src/pages/admin/newportal/create/parametrer-hymne/4.tsx @@ -1,7 +1,8 @@ -import { ButtonBase, Card } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; +import { ButtonBase, Card } from '@mui/material'; + import styles from '../../../../../styles/parametrer-hymne.module.css'; import { isAnthem } from 'src/activity-types/anyActivity'; import { PageLayout } from 'src/components/PageLayout'; diff --git a/src/pages/admin/newportal/create/parametrer-hymne/5.tsx b/src/pages/admin/newportal/create/parametrer-hymne/5.tsx index 935f50aaa..2e83d9e84 100644 --- a/src/pages/admin/newportal/create/parametrer-hymne/5.tsx +++ b/src/pages/admin/newportal/create/parametrer-hymne/5.tsx @@ -1,11 +1,12 @@ -import Backdrop from '@mui/material/Backdrop'; -import Button from '@mui/material/Button'; -import CircularProgress from '@mui/material/CircularProgress'; import classNames from 'classnames'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; +import Backdrop from '@mui/material/Backdrop'; +import Button from '@mui/material/Button'; +import CircularProgress from '@mui/material/CircularProgress'; + import { isAnthem } from 'src/activity-types/anyActivity'; import { PageLayout } from 'src/components/PageLayout'; import { Steps } from 'src/components/Steps'; diff --git a/src/pages/admin/newportal/create/parametrer-hymne/index.tsx b/src/pages/admin/newportal/create/parametrer-hymne/index.tsx index c989c5d23..6fa159c09 100644 --- a/src/pages/admin/newportal/create/parametrer-hymne/index.tsx +++ b/src/pages/admin/newportal/create/parametrer-hymne/index.tsx @@ -1,8 +1,9 @@ -import { Button } from '@mui/material'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; +import { Button } from '@mui/material'; + import { UserContext } from 'src/contexts/userContext'; import BackArrow from 'src/svg/back-arrow.svg'; import { UserType } from 'types/user.type'; diff --git a/src/pages/admin/newportal/create/parametrer-hymne/success.tsx b/src/pages/admin/newportal/create/parametrer-hymne/success.tsx index 578c10da0..5ff1a1d99 100644 --- a/src/pages/admin/newportal/create/parametrer-hymne/success.tsx +++ b/src/pages/admin/newportal/create/parametrer-hymne/success.tsx @@ -1,7 +1,8 @@ -import { Button } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import { Button } from '@mui/material'; + import { PageLayout } from 'src/components/PageLayout'; import { bgPage } from 'src/styles/variables.const'; import PelicoSouriant from 'src/svg/pelico/pelico-souriant.svg'; diff --git a/src/pages/admin/newportal/h5p/edit/[id].tsx b/src/pages/admin/newportal/h5p/edit/[id].tsx index 8ec4033cf..afa113383 100644 --- a/src/pages/admin/newportal/h5p/edit/[id].tsx +++ b/src/pages/admin/newportal/h5p/edit/[id].tsx @@ -1,12 +1,13 @@ -import NavigateNextIcon from '@mui/icons-material/NavigateNext'; -import { Breadcrumbs, Button } from '@mui/material'; -import MaterialLink from '@mui/material/Link'; import Link from 'next/link'; import { useRouter } from 'next/router'; import { useSnackbar } from 'notistack'; import * as React from 'react'; import { useQueryClient } from 'react-query'; +import NavigateNextIcon from '@mui/icons-material/NavigateNext'; +import { Breadcrumbs, Button } from '@mui/material'; +import MaterialLink from '@mui/material/Link'; + import { useH5pContentList } from 'src/api/h5p/h5p-content.list'; import { AdminTile } from 'src/components/admin/AdminTile'; import { H5pEditor } from 'src/components/h5p'; diff --git a/src/pages/admin/newportal/h5p/index.tsx b/src/pages/admin/newportal/h5p/index.tsx index 3706652fd..a77f9ee5b 100644 --- a/src/pages/admin/newportal/h5p/index.tsx +++ b/src/pages/admin/newportal/h5p/index.tsx @@ -1,13 +1,14 @@ -import AddCircleIcon from '@mui/icons-material/AddCircle'; -import DeleteIcon from '@mui/icons-material/Delete'; -import EditIcon from '@mui/icons-material/Edit'; -import { Button, NoSsr, IconButton, Tooltip } from '@mui/material'; import Link from 'next/link'; import { useRouter } from 'next/router'; import { useSnackbar } from 'notistack'; import * as React from 'react'; import { useQueryClient } from 'react-query'; +import AddCircleIcon from '@mui/icons-material/AddCircle'; +import DeleteIcon from '@mui/icons-material/Delete'; +import EditIcon from '@mui/icons-material/Edit'; +import { Button, NoSsr, IconButton, Tooltip } from '@mui/material'; + import { useDeleteH5pContentMutation } from 'src/api/h5p/h5p-content.delete'; import { useH5pContentList } from 'src/api/h5p/h5p-content.list'; import { Modal } from 'src/components/Modal'; diff --git a/src/pages/admin/newportal/h5p/new.tsx b/src/pages/admin/newportal/h5p/new.tsx index 9442552ff..16c884ead 100644 --- a/src/pages/admin/newportal/h5p/new.tsx +++ b/src/pages/admin/newportal/h5p/new.tsx @@ -1,12 +1,13 @@ -import NavigateNextIcon from '@mui/icons-material/NavigateNext'; -import { Breadcrumbs, Button } from '@mui/material'; -import MaterialLink from '@mui/material/Link'; import Link from 'next/link'; import { useRouter } from 'next/router'; import { useSnackbar } from 'notistack'; import * as React from 'react'; import { useQueryClient } from 'react-query'; +import NavigateNextIcon from '@mui/icons-material/NavigateNext'; +import { Breadcrumbs, Button } from '@mui/material'; +import MaterialLink from '@mui/material/Link'; + import { AdminTile } from 'src/components/admin/AdminTile'; import { H5pEditor } from 'src/components/h5p'; diff --git a/src/pages/admin/newportal/index.tsx b/src/pages/admin/newportal/index.tsx index a2cfe8ce2..527d69d54 100644 --- a/src/pages/admin/newportal/index.tsx +++ b/src/pages/admin/newportal/index.tsx @@ -1,7 +1,8 @@ -import { List, ListItem, ListItemIcon, ListItemText } from '@mui/material'; import Link from 'next/link'; import React, { useMemo } from 'react'; +import { List, ListItem, ListItemIcon, ListItemText } from '@mui/material'; + import DoubleChevronRightIcon from 'src/svg/mdi-light_chevron-double-right.svg'; type Link = { diff --git a/src/pages/admin/newportal/manage/access/index.tsx b/src/pages/admin/newportal/manage/access/index.tsx index 5baa6353a..8555ba70c 100644 --- a/src/pages/admin/newportal/manage/access/index.tsx +++ b/src/pages/admin/newportal/manage/access/index.tsx @@ -1,3 +1,8 @@ +import Link from 'next/link'; +import { useSnackbar } from 'notistack'; +import React, { useState, useMemo } from 'react'; +import { useQueryClient } from 'react-query'; + import { Button, Table, @@ -20,10 +25,6 @@ import { FormControl, } from '@mui/material'; import type { SelectChangeEvent } from '@mui/material/Select'; -import Link from 'next/link'; -import { useSnackbar } from 'notistack'; -import React, { useState, useMemo } from 'react'; -import { useQueryClient } from 'react-query'; import { useFeatureFlags } from 'src/api/featureFlag/featureFlag.get'; import { useUsers } from 'src/api/user/user.list'; diff --git a/src/pages/admin/newportal/manage/index.tsx b/src/pages/admin/newportal/manage/index.tsx index 1d5911a20..11483cea7 100644 --- a/src/pages/admin/newportal/manage/index.tsx +++ b/src/pages/admin/newportal/manage/index.tsx @@ -1,7 +1,8 @@ -import { List, ListItem, ListItemIcon, ListItemText } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import { List, ListItem, ListItemIcon, ListItemText } from '@mui/material'; + import { UserContext } from 'src/contexts/userContext'; import DoubleChevronRightIcon from 'src/svg/mdi-light_chevron-double-right.svg'; import { UserType } from 'types/user.type'; diff --git a/src/pages/admin/newportal/manage/settings/archive/index.tsx b/src/pages/admin/newportal/manage/settings/archive/index.tsx index 5b31778bd..95cbc857a 100644 --- a/src/pages/admin/newportal/manage/settings/archive/index.tsx +++ b/src/pages/admin/newportal/manage/settings/archive/index.tsx @@ -1,8 +1,9 @@ -import { Typography, Box, List, ListItem } from '@mui/material'; import Link from 'next/link'; import { useSnackbar } from 'notistack'; import React, { useEffect, useState } from 'react'; +import { Typography, Box, List, ListItem } from '@mui/material'; + import { useListArchives } from 'src/api/archive/archive.get'; import { UserContext } from 'src/contexts/userContext'; import BackArrow from 'src/svg/back-arrow.svg'; diff --git a/src/pages/admin/newportal/manage/settings/index.tsx b/src/pages/admin/newportal/manage/settings/index.tsx index 157259377..433a871f7 100644 --- a/src/pages/admin/newportal/manage/settings/index.tsx +++ b/src/pages/admin/newportal/manage/settings/index.tsx @@ -1,7 +1,8 @@ -import { List, ListItem, ListItemIcon, ListItemText } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import { List, ListItem, ListItemIcon, ListItemText } from '@mui/material'; + import { UserContext } from 'src/contexts/userContext'; import BackArrow from 'src/svg/back-arrow.svg'; import DoubleChevronRightIcon from 'src/svg/mdi-light_chevron-double-right.svg'; diff --git a/src/pages/admin/newportal/manage/settings/pelico/index.tsx b/src/pages/admin/newportal/manage/settings/pelico/index.tsx index 43051bbd1..f06f6afbb 100644 --- a/src/pages/admin/newportal/manage/settings/pelico/index.tsx +++ b/src/pages/admin/newportal/manage/settings/pelico/index.tsx @@ -1,10 +1,11 @@ -import Button from '@mui/material/Button'; import Link from 'next/link'; import { useRouter } from 'next/router'; import { useSnackbar } from 'notistack'; import React, { useEffect, useState } from 'react'; import { useQueryClient } from 'react-query'; +import Button from '@mui/material/Button'; + import { usePelicoPresentation } from 'src/api/pelicoPresentation/pelicoPresentation.get'; import { useCreatePelicoPresentation } from 'src/api/pelicoPresentation/pelicoPresentation.post'; import { useUpdatePelicoPresentation } from 'src/api/pelicoPresentation/pelicoPresentation.put'; diff --git a/src/pages/admin/newportal/manage/settings/phases/index.tsx b/src/pages/admin/newportal/manage/settings/phases/index.tsx index 519257090..8ee36cb75 100644 --- a/src/pages/admin/newportal/manage/settings/phases/index.tsx +++ b/src/pages/admin/newportal/manage/settings/phases/index.tsx @@ -1,7 +1,8 @@ -import { Button, Checkbox, Paper, Table, TableBody, TableCell, TableContainer, TableHead, TableRow } from '@mui/material'; import Link from 'next/link'; import React, { useState, useEffect } from 'react'; +import { Button, Checkbox, Paper, Table, TableBody, TableCell, TableContainer, TableHead, TableRow } from '@mui/material'; + import { useGetVillages } from 'src/api/villages/villages.get'; import { SavePhasesModal } from 'src/components/admin/manage/settings/SavePhasesModal'; import { UserContext } from 'src/contexts/userContext'; diff --git a/src/pages/admin/newportal/manage/users/edit/[id].tsx b/src/pages/admin/newportal/manage/users/edit/[id].tsx index 3614eecc0..7f499c43a 100644 --- a/src/pages/admin/newportal/manage/users/edit/[id].tsx +++ b/src/pages/admin/newportal/manage/users/edit/[id].tsx @@ -1,3 +1,8 @@ +import Link from 'next/link'; +import { useRouter } from 'next/router'; +import { useSnackbar } from 'notistack'; +import React from 'react'; + import NavigateNextIcon from '@mui/icons-material/NavigateNext'; import Breadcrumbs from '@mui/material/Breadcrumbs'; import Button from '@mui/material/Button'; @@ -7,10 +12,6 @@ import MaterialLink from '@mui/material/Link'; import MenuItem from '@mui/material/MenuItem'; import Select from '@mui/material/Select'; import TextField from '@mui/material/TextField'; -import Link from 'next/link'; -import { useRouter } from 'next/router'; -import { useSnackbar } from 'notistack'; -import React from 'react'; import { AdminTile } from 'src/components/admin/AdminTile'; import { CountrySelector } from 'src/components/selectors/CountrySelector'; diff --git a/src/pages/admin/newportal/manage/users/index.tsx b/src/pages/admin/newportal/manage/users/index.tsx index 22d4cbc40..b92744209 100644 --- a/src/pages/admin/newportal/manage/users/index.tsx +++ b/src/pages/admin/newportal/manage/users/index.tsx @@ -1,3 +1,7 @@ +import Link from 'next/link'; +import { useRouter } from 'next/router'; +import React, { useCallback, useMemo, useState } from 'react'; + import AddCircleIcon from '@mui/icons-material/AddCircle'; import DeleteIcon from '@mui/icons-material/Delete'; import DownloadIcon from '@mui/icons-material/Download'; @@ -9,9 +13,6 @@ import Chip from '@mui/material/Chip'; import IconButton from '@mui/material/IconButton'; import NoSsr from '@mui/material/NoSsr'; import Tooltip from '@mui/material/Tooltip'; -import Link from 'next/link'; -import { useRouter } from 'next/router'; -import React, { useCallback, useMemo, useState } from 'react'; import { useUsers } from 'src/api/user/user.list'; import { Modal } from 'src/components/Modal'; diff --git a/src/pages/admin/newportal/manage/users/new.tsx b/src/pages/admin/newportal/manage/users/new.tsx index 4bf0da9d9..f08869360 100644 --- a/src/pages/admin/newportal/manage/users/new.tsx +++ b/src/pages/admin/newportal/manage/users/new.tsx @@ -1,3 +1,8 @@ +import Link from 'next/link'; +import { useRouter } from 'next/router'; +import { useSnackbar } from 'notistack'; +import React from 'react'; + import NavigateNextIcon from '@mui/icons-material/NavigateNext'; import Breadcrumbs from '@mui/material/Breadcrumbs'; import Button from '@mui/material/Button'; @@ -7,10 +12,6 @@ import MaterialLink from '@mui/material/Link'; import MenuItem from '@mui/material/MenuItem'; import Select from '@mui/material/Select'; import TextField from '@mui/material/TextField'; -import Link from 'next/link'; -import { useRouter } from 'next/router'; -import { useSnackbar } from 'notistack'; -import React from 'react'; import { AdminTile } from 'src/components/admin/AdminTile'; import { CountrySelector } from 'src/components/selectors/CountrySelector'; diff --git a/src/pages/admin/newportal/manage/villages/edit/[id].tsx b/src/pages/admin/newportal/manage/villages/edit/[id].tsx index 73299c62c..eca5ec10c 100644 --- a/src/pages/admin/newportal/manage/villages/edit/[id].tsx +++ b/src/pages/admin/newportal/manage/villages/edit/[id].tsx @@ -1,10 +1,11 @@ +import Link from 'next/link'; +import { useRouter } from 'next/router'; +import React from 'react'; + import NavigateNextIcon from '@mui/icons-material/NavigateNext'; import { Button, TextField } from '@mui/material'; import Breadcrumbs from '@mui/material/Breadcrumbs'; import MaterialLink from '@mui/material/Link'; -import Link from 'next/link'; -import { useRouter } from 'next/router'; -import React from 'react'; import { AdminTile } from 'src/components/admin/AdminTile'; import { CountrySelector } from 'src/components/selectors/CountrySelector'; diff --git a/src/pages/admin/newportal/manage/villages/index.tsx b/src/pages/admin/newportal/manage/villages/index.tsx index 205a249a2..07dedea25 100644 --- a/src/pages/admin/newportal/manage/villages/index.tsx +++ b/src/pages/admin/newportal/manage/villages/index.tsx @@ -1,3 +1,7 @@ +import Link from 'next/link'; +import { useRouter } from 'next/router'; +import React, { useCallback, useMemo, useState } from 'react'; + import AddCircleIcon from '@mui/icons-material/AddCircle'; import DeleteIcon from '@mui/icons-material/Delete'; import EditIcon from '@mui/icons-material/Edit'; @@ -7,9 +11,6 @@ import Backdrop from '@mui/material/Backdrop'; import CircularProgress from '@mui/material/CircularProgress'; import IconButton from '@mui/material/IconButton'; import Tooltip from '@mui/material/Tooltip'; -import Link from 'next/link'; -import { useRouter } from 'next/router'; -import React, { useCallback, useMemo, useState } from 'react'; import { Modal } from 'src/components/Modal'; import { AdminTile } from 'src/components/admin/AdminTile'; diff --git a/src/pages/admin/newportal/manage/villages/new.tsx b/src/pages/admin/newportal/manage/villages/new.tsx index 8f543c76e..2658f5911 100644 --- a/src/pages/admin/newportal/manage/villages/new.tsx +++ b/src/pages/admin/newportal/manage/villages/new.tsx @@ -1,10 +1,11 @@ +import Link from 'next/link'; +import { useRouter } from 'next/router'; +import React from 'react'; + import NavigateNextIcon from '@mui/icons-material/NavigateNext'; import { Button, TextField } from '@mui/material'; import Breadcrumbs from '@mui/material/Breadcrumbs'; import MaterialLink from '@mui/material/Link'; -import Link from 'next/link'; -import { useRouter } from 'next/router'; -import React from 'react'; import { AdminTile } from 'src/components/admin/AdminTile'; import { CountrySelector } from 'src/components/selectors/CountrySelector'; diff --git a/src/pages/admin/newportal/medialibrary/index.tsx b/src/pages/admin/newportal/medialibrary/index.tsx index 7f6a28475..8a21f2f25 100644 --- a/src/pages/admin/newportal/medialibrary/index.tsx +++ b/src/pages/admin/newportal/medialibrary/index.tsx @@ -12,12 +12,13 @@ // STEP 4: le bouton télécharger (image, vidéo, son) (lib jszip par exemple) // STEP 4.1: comment on dl une vidéo youtube ? Souvent des vidéos Viméo (bah on dl pas) +import React, { useContext, useState } from 'react'; + import RefreshIcon from '@mui/icons-material/Refresh'; import Button from '@mui/material/Button'; import IconButton from '@mui/material/IconButton'; import Pagination from '@mui/material/Pagination'; import Stack from '@mui/material/Stack'; -import React, { useContext, useState } from 'react'; import MediaCard from 'src/components/admin/mediatheque/CardMediatheque'; import CheckboxAdmin from 'src/components/admin/mediatheque/CheckboxAdmin'; diff --git a/src/pages/admin/newportal/publier/draft/index.tsx b/src/pages/admin/newportal/publier/draft/index.tsx index 72b6101fc..d1bd91dbc 100644 --- a/src/pages/admin/newportal/publier/draft/index.tsx +++ b/src/pages/admin/newportal/publier/draft/index.tsx @@ -1,7 +1,8 @@ -import { useMediaQuery } from '@mui/material'; import Link from 'next/link'; import React, { useState } from 'react'; +import { useMediaQuery } from '@mui/material'; + import { useGetActivitiesAdminDraft } from 'src/api/activities/activities.admin.get'; import SearchField from 'src/components/SearchField'; import AllActivitiesAdmin from 'src/components/activities/ActivityCard/activity-admin/AllActivitiesAdmin'; diff --git a/src/pages/admin/newportal/publier/index.tsx b/src/pages/admin/newportal/publier/index.tsx index dde2cbf5e..78dffcc22 100644 --- a/src/pages/admin/newportal/publier/index.tsx +++ b/src/pages/admin/newportal/publier/index.tsx @@ -1,8 +1,9 @@ -import type { GridColDef, GridRowsProp } from '@mui/x-data-grid'; -import { DataGrid } from '@mui/x-data-grid'; import { useRouter } from 'next/router'; import React, { useEffect } from 'react'; +import type { GridColDef, GridRowsProp } from '@mui/x-data-grid'; +import { DataGrid } from '@mui/x-data-grid'; + import { useGetActivitiesAdminDraft } from 'src/api/activities/activities.admin.get'; import ActivityCardAdminList from 'src/components/activities/ActivityCard/activity-admin/ActivityCardAdminList'; import { UserContext } from 'src/contexts/userContext'; diff --git a/src/pages/admin/newportal/publier/prepublish/[id].tsx b/src/pages/admin/newportal/publier/prepublish/[id].tsx index a34c97567..a471b1bcf 100644 --- a/src/pages/admin/newportal/publier/prepublish/[id].tsx +++ b/src/pages/admin/newportal/publier/prepublish/[id].tsx @@ -1,3 +1,9 @@ +import Link from 'next/link'; +import { useRouter } from 'next/router'; +import { useSnackbar } from 'notistack'; +import React, { useEffect } from 'react'; +import { useQueryClient } from 'react-query'; + import ChevronLeftIcon from '@mui/icons-material/ChevronLeft'; import { Skeleton } from '@mui/material'; import Box from '@mui/material/Box'; @@ -9,11 +15,6 @@ import InputLabel from '@mui/material/InputLabel'; import MenuItem from '@mui/material/MenuItem'; import type { SelectChangeEvent } from '@mui/material/Select'; import Select from '@mui/material/Select'; -import Link from 'next/link'; -import { useRouter } from 'next/router'; -import { useSnackbar } from 'notistack'; -import React, { useEffect } from 'react'; -import { useQueryClient } from 'react-query'; import { postAdminActivity } from 'src/api/activities/activities.admin.post'; import { useGetOneActivityById } from 'src/api/activities/activities.getOneById'; diff --git a/src/pages/admin/newportal/publier/prepublish/edit/[id].tsx b/src/pages/admin/newportal/publier/prepublish/edit/[id].tsx index c29e38968..6693b34b9 100644 --- a/src/pages/admin/newportal/publier/prepublish/edit/[id].tsx +++ b/src/pages/admin/newportal/publier/prepublish/edit/[id].tsx @@ -1,3 +1,9 @@ +import Link from 'next/link'; +import { useRouter } from 'next/router'; +import { useSnackbar } from 'notistack'; +import React, { useEffect } from 'react'; +import { useQueryClient } from 'react-query'; + import ChevronLeftIcon from '@mui/icons-material/ChevronLeft'; import { Skeleton } from '@mui/material'; import Box from '@mui/material/Box'; @@ -9,11 +15,6 @@ import InputLabel from '@mui/material/InputLabel'; import MenuItem from '@mui/material/MenuItem'; import type { SelectChangeEvent } from '@mui/material/Select'; import Select from '@mui/material/Select'; -import Link from 'next/link'; -import { useRouter } from 'next/router'; -import { useSnackbar } from 'notistack'; -import React, { useEffect } from 'react'; -import { useQueryClient } from 'react-query'; import { deleteActivity } from 'src/api/activities/activities.admin.delete'; import { postAdminActivity } from 'src/api/activities/activities.admin.post'; diff --git a/src/pages/admin/newportal/publish/index.tsx b/src/pages/admin/newportal/publish/index.tsx index 601db718e..d87790958 100644 --- a/src/pages/admin/newportal/publish/index.tsx +++ b/src/pages/admin/newportal/publish/index.tsx @@ -1,8 +1,9 @@ -import type { GridColDef, GridRowsProp } from '@mui/x-data-grid'; -import { DataGrid } from '@mui/x-data-grid'; import { useRouter } from 'next/router'; import React, { useEffect } from 'react'; +import type { GridColDef, GridRowsProp } from '@mui/x-data-grid'; +import { DataGrid } from '@mui/x-data-grid'; + import { useGetActivities } from 'src/api/activities/activities.get'; import ActivityCardAdminList from 'src/components/activities/ActivityCard/activity-admin/ActivityCardAdminList'; import { UserContext } from 'src/contexts/userContext'; diff --git a/src/pages/admin/stats.tsx b/src/pages/admin/stats.tsx index bb410edc3..bed135e8f 100644 --- a/src/pages/admin/stats.tsx +++ b/src/pages/admin/stats.tsx @@ -1,7 +1,8 @@ -import MaterialLink from '@mui/material/Link'; import Link from 'next/link'; import React from 'react'; +import MaterialLink from '@mui/material/Link'; + const Stats = () => { return (
diff --git a/src/pages/admin/users/edit/[id].tsx b/src/pages/admin/users/edit/[id].tsx index 719edcf6e..e365604fd 100644 --- a/src/pages/admin/users/edit/[id].tsx +++ b/src/pages/admin/users/edit/[id].tsx @@ -1,3 +1,8 @@ +import Link from 'next/link'; +import { useRouter } from 'next/router'; +import { useSnackbar } from 'notistack'; +import React from 'react'; + import NavigateNextIcon from '@mui/icons-material/NavigateNext'; import Breadcrumbs from '@mui/material/Breadcrumbs'; import Button from '@mui/material/Button'; @@ -7,10 +12,6 @@ import MaterialLink from '@mui/material/Link'; import MenuItem from '@mui/material/MenuItem'; import Select from '@mui/material/Select'; import TextField from '@mui/material/TextField'; -import Link from 'next/link'; -import { useRouter } from 'next/router'; -import { useSnackbar } from 'notistack'; -import React from 'react'; import { AdminTile } from 'src/components/admin/AdminTile'; import { CountrySelector } from 'src/components/selectors/CountrySelector'; diff --git a/src/pages/admin/users/index.tsx b/src/pages/admin/users/index.tsx index 0505d9bbe..7f5ade037 100644 --- a/src/pages/admin/users/index.tsx +++ b/src/pages/admin/users/index.tsx @@ -1,3 +1,7 @@ +import Link from 'next/link'; +import { useRouter } from 'next/router'; +import React, { useCallback, useMemo, useState } from 'react'; + import AddCircleIcon from '@mui/icons-material/AddCircle'; import DeleteIcon from '@mui/icons-material/Delete'; import DownloadIcon from '@mui/icons-material/Download'; @@ -10,9 +14,6 @@ import IconButton from '@mui/material/IconButton'; import MaterialLink from '@mui/material/Link'; import NoSsr from '@mui/material/NoSsr'; import Tooltip from '@mui/material/Tooltip'; -import Link from 'next/link'; -import { useRouter } from 'next/router'; -import React, { useCallback, useMemo, useState } from 'react'; import { useUsers } from 'src/api/user/user.list'; import { Modal } from 'src/components/Modal'; diff --git a/src/pages/admin/users/new.tsx b/src/pages/admin/users/new.tsx index 8bfd8b88a..ba22bd668 100644 --- a/src/pages/admin/users/new.tsx +++ b/src/pages/admin/users/new.tsx @@ -1,3 +1,8 @@ +import Link from 'next/link'; +import { useRouter } from 'next/router'; +import { useSnackbar } from 'notistack'; +import React from 'react'; + import NavigateNextIcon from '@mui/icons-material/NavigateNext'; import Breadcrumbs from '@mui/material/Breadcrumbs'; import Button from '@mui/material/Button'; @@ -7,10 +12,6 @@ import MaterialLink from '@mui/material/Link'; import MenuItem from '@mui/material/MenuItem'; import Select from '@mui/material/Select'; import TextField from '@mui/material/TextField'; -import Link from 'next/link'; -import { useRouter } from 'next/router'; -import { useSnackbar } from 'notistack'; -import React from 'react'; import { AdminTile } from 'src/components/admin/AdminTile'; import { CountrySelector } from 'src/components/selectors/CountrySelector'; diff --git a/src/pages/admin/villages/edit/[id].tsx b/src/pages/admin/villages/edit/[id].tsx index 8250c1017..8f7bb6544 100644 --- a/src/pages/admin/villages/edit/[id].tsx +++ b/src/pages/admin/villages/edit/[id].tsx @@ -1,10 +1,11 @@ +import Link from 'next/link'; +import { useRouter } from 'next/router'; +import React from 'react'; + import NavigateNextIcon from '@mui/icons-material/NavigateNext'; import { Button, TextField } from '@mui/material'; import Breadcrumbs from '@mui/material/Breadcrumbs'; import MaterialLink from '@mui/material/Link'; -import Link from 'next/link'; -import { useRouter } from 'next/router'; -import React from 'react'; import { AdminTile } from 'src/components/admin/AdminTile'; import { CountrySelector } from 'src/components/selectors/CountrySelector'; diff --git a/src/pages/admin/villages/index.tsx b/src/pages/admin/villages/index.tsx index d9c5ee205..6b6ea9914 100644 --- a/src/pages/admin/villages/index.tsx +++ b/src/pages/admin/villages/index.tsx @@ -1,3 +1,7 @@ +import Link from 'next/link'; +import { useRouter } from 'next/router'; +import React, { useCallback, useMemo, useState } from 'react'; + import AddCircleIcon from '@mui/icons-material/AddCircle'; import DeleteIcon from '@mui/icons-material/Delete'; import EditIcon from '@mui/icons-material/Edit'; @@ -8,9 +12,6 @@ import CircularProgress from '@mui/material/CircularProgress'; import IconButton from '@mui/material/IconButton'; import MaterialLink from '@mui/material/Link'; import Tooltip from '@mui/material/Tooltip'; -import Link from 'next/link'; -import { useRouter } from 'next/router'; -import React, { useCallback, useMemo, useState } from 'react'; import { Modal } from 'src/components/Modal'; import { AdminTile } from 'src/components/admin/AdminTile'; diff --git a/src/pages/admin/villages/new.tsx b/src/pages/admin/villages/new.tsx index 2ca7ab37c..a8feb2d87 100644 --- a/src/pages/admin/villages/new.tsx +++ b/src/pages/admin/villages/new.tsx @@ -1,10 +1,11 @@ +import Link from 'next/link'; +import { useRouter } from 'next/router'; +import React from 'react'; + import NavigateNextIcon from '@mui/icons-material/NavigateNext'; import { Button, TextField } from '@mui/material'; import Breadcrumbs from '@mui/material/Breadcrumbs'; import MaterialLink from '@mui/material/Link'; -import Link from 'next/link'; -import { useRouter } from 'next/router'; -import React from 'react'; import { AdminTile } from 'src/components/admin/AdminTile'; import { CountrySelector } from 'src/components/selectors/CountrySelector'; diff --git a/src/pages/chanter-un-couplet/1.tsx b/src/pages/chanter-un-couplet/1.tsx index f5deac592..64ee455f5 100644 --- a/src/pages/chanter-un-couplet/1.tsx +++ b/src/pages/chanter-un-couplet/1.tsx @@ -1,8 +1,9 @@ -import Backdrop from '@mui/material/Backdrop'; -import CircularProgress from '@mui/material/CircularProgress'; import { useRouter } from 'next/router'; import React from 'react'; +import Backdrop from '@mui/material/Backdrop'; +import CircularProgress from '@mui/material/CircularProgress'; + import styles from '../../styles/chanter-un-couplet.module.css'; import { postMixAudio } from 'src/api/audio/audio-mix.post'; import { deleteAudio } from 'src/api/audio/audio.delete'; diff --git a/src/pages/chanter-un-couplet/4.tsx b/src/pages/chanter-un-couplet/4.tsx index 40c40af8a..2b9abf916 100644 --- a/src/pages/chanter-un-couplet/4.tsx +++ b/src/pages/chanter-un-couplet/4.tsx @@ -1,9 +1,10 @@ +import { useRouter } from 'next/router'; +import React from 'react'; + import MicNoneIcon from '@mui/icons-material/MicNone'; import Backdrop from '@mui/material/Backdrop'; import Button from '@mui/material/Button'; import CircularProgress from '@mui/material/CircularProgress'; -import { useRouter } from 'next/router'; -import React from 'react'; import styles from '../../styles/chanter-un-couplet.module.css'; import { postMixAudio } from 'src/api/audio/audio-mix.post'; diff --git a/src/pages/chanter-un-couplet/5.tsx b/src/pages/chanter-un-couplet/5.tsx index c6375081b..b9862a3b5 100644 --- a/src/pages/chanter-un-couplet/5.tsx +++ b/src/pages/chanter-un-couplet/5.tsx @@ -1,11 +1,12 @@ -import Backdrop from '@mui/material/Backdrop'; -import Button from '@mui/material/Button'; -import CircularProgress from '@mui/material/CircularProgress'; import classNames from 'classnames'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; +import Backdrop from '@mui/material/Backdrop'; +import Button from '@mui/material/Button'; +import CircularProgress from '@mui/material/CircularProgress'; + import { Base } from 'src/components/Base'; import { PageLayout } from 'src/components/PageLayout'; import { Steps } from 'src/components/Steps'; diff --git a/src/pages/chanter-un-couplet/success.tsx b/src/pages/chanter-un-couplet/success.tsx index f3e98162f..b243eb836 100644 --- a/src/pages/chanter-un-couplet/success.tsx +++ b/src/pages/chanter-un-couplet/success.tsx @@ -1,7 +1,8 @@ -import { Button } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import { Button } from '@mui/material'; + import { Base } from 'src/components/Base'; import { PageLayout } from 'src/components/PageLayout'; import { bgPage } from 'src/styles/variables.const'; diff --git a/src/pages/connexion.tsx b/src/pages/connexion.tsx index 899b8df89..203fac8e4 100644 --- a/src/pages/connexion.tsx +++ b/src/pages/connexion.tsx @@ -1,3 +1,6 @@ +import { useRouter } from 'next/router'; +import React from 'react'; + import Visibility from '@mui/icons-material/Visibility'; import VisibilityOff from '@mui/icons-material/VisibilityOff'; import { @@ -15,8 +18,6 @@ import { TextField, Typography, } from '@mui/material'; -import { useRouter } from 'next/router'; -import React from 'react'; import { isRedirectValid } from '../components/accueil/NewHome'; import { UserContext } from 'src/contexts/userContext'; diff --git a/src/pages/contenu-libre/2.tsx b/src/pages/contenu-libre/2.tsx index 5582ca98b..b98a90b43 100644 --- a/src/pages/contenu-libre/2.tsx +++ b/src/pages/contenu-libre/2.tsx @@ -1,8 +1,9 @@ -import { TextField, Switch, Button } from '@mui/material'; import Image from 'next/image'; import { useRouter } from 'next/router'; import React from 'react'; +import { TextField, Switch, Button } from '@mui/material'; + import { isFreeContent } from 'src/activity-types/anyActivity'; import { getImage } from 'src/activity-types/freeContent.constants'; import type { FreeContentData } from 'src/activity-types/freeContent.types'; diff --git a/src/pages/contenu-libre/3.tsx b/src/pages/contenu-libre/3.tsx index 472f2dbfb..b1d53264a 100644 --- a/src/pages/contenu-libre/3.tsx +++ b/src/pages/contenu-libre/3.tsx @@ -1,11 +1,12 @@ -import Backdrop from '@mui/material/Backdrop'; -import Button from '@mui/material/Button'; -import CircularProgress from '@mui/material/CircularProgress'; import classNames from 'classnames'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; +import Backdrop from '@mui/material/Backdrop'; +import Button from '@mui/material/Button'; +import CircularProgress from '@mui/material/CircularProgress'; + import { isFreeContent } from 'src/activity-types/anyActivity'; import type { FreeContentData } from 'src/activity-types/freeContent.types'; import { Base } from 'src/components/Base'; diff --git a/src/pages/contenu-libre/success.tsx b/src/pages/contenu-libre/success.tsx index 4b3ae8205..927dacbc8 100644 --- a/src/pages/contenu-libre/success.tsx +++ b/src/pages/contenu-libre/success.tsx @@ -1,7 +1,8 @@ -import { Button } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import { Button } from '@mui/material'; + import { Base } from 'src/components/Base'; import { PageLayout } from 'src/components/PageLayout'; import { bgPage } from 'src/styles/variables.const'; diff --git a/src/pages/creer-un-jeu/expression/5.tsx b/src/pages/creer-un-jeu/expression/5.tsx index 57906da52..1ba3022af 100644 --- a/src/pages/creer-un-jeu/expression/5.tsx +++ b/src/pages/creer-un-jeu/expression/5.tsx @@ -1,7 +1,8 @@ -import { Button, Tooltip, Backdrop, CircularProgress } from '@mui/material'; import { useRouter } from 'next/router'; import React, { useContext } from 'react'; +import { Button, Tooltip, Backdrop, CircularProgress } from '@mui/material'; + import { postGameDataMonneyOrExpression } from 'src/api/game/game.post'; import { Base } from 'src/components/Base'; import { Steps } from 'src/components/Steps'; diff --git a/src/pages/creer-un-jeu/expression/index.tsx b/src/pages/creer-un-jeu/expression/index.tsx index eedb7eaf5..1d3320e7d 100644 --- a/src/pages/creer-un-jeu/expression/index.tsx +++ b/src/pages/creer-un-jeu/expression/index.tsx @@ -1,9 +1,10 @@ -import Button from '@mui/material/Button'; -import { Box } from '@mui/system'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; +import Button from '@mui/material/Button'; +import { Box } from '@mui/system'; + import { Base } from 'src/components/Base'; import { PageLayout } from 'src/components/PageLayout'; diff --git a/src/pages/creer-un-jeu/mimique/4.tsx b/src/pages/creer-un-jeu/mimique/4.tsx index 19e385e66..fd9cd56a0 100644 --- a/src/pages/creer-un-jeu/mimique/4.tsx +++ b/src/pages/creer-un-jeu/mimique/4.tsx @@ -1,7 +1,8 @@ -import { Button, Tooltip, Backdrop, CircularProgress } from '@mui/material'; import { useRouter } from 'next/router'; import React, { useContext } from 'react'; +import { Button, Tooltip, Backdrop, CircularProgress } from '@mui/material'; + import { postGameDataMonneyOrExpression } from 'src/api/game/game.post'; import { Base } from 'src/components/Base'; import { PageLayout } from 'src/components/PageLayout'; diff --git a/src/pages/creer-un-jeu/mimique/index.tsx b/src/pages/creer-un-jeu/mimique/index.tsx index ac527fdd8..139861e06 100644 --- a/src/pages/creer-un-jeu/mimique/index.tsx +++ b/src/pages/creer-un-jeu/mimique/index.tsx @@ -1,9 +1,10 @@ -import Button from '@mui/material/Button'; -import { Box } from '@mui/system'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React, { useContext, useEffect } from 'react'; +import Button from '@mui/material/Button'; +import { Box } from '@mui/system'; + import { Base } from 'src/components/Base'; import { PageLayout } from 'src/components/PageLayout'; import { GameContext } from 'src/contexts/gameContext'; diff --git a/src/pages/creer-un-jeu/objet/5.tsx b/src/pages/creer-un-jeu/objet/5.tsx index cbe1255df..60c9d7a73 100644 --- a/src/pages/creer-un-jeu/objet/5.tsx +++ b/src/pages/creer-un-jeu/objet/5.tsx @@ -1,7 +1,8 @@ -import { Button, Tooltip, Backdrop, CircularProgress } from '@mui/material'; import { useRouter } from 'next/router'; import React, { useContext } from 'react'; +import { Button, Tooltip, Backdrop, CircularProgress } from '@mui/material'; + import { postGameDataMonneyOrExpression } from 'src/api/game/game.post'; import { Base } from 'src/components/Base'; import { Steps } from 'src/components/Steps'; diff --git a/src/pages/creer-un-jeu/objet/index.tsx b/src/pages/creer-un-jeu/objet/index.tsx index d8e0bab2d..0870d3c41 100644 --- a/src/pages/creer-un-jeu/objet/index.tsx +++ b/src/pages/creer-un-jeu/objet/index.tsx @@ -1,9 +1,10 @@ -import Button from '@mui/material/Button'; -import { Box } from '@mui/system'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; +import Button from '@mui/material/Button'; +import { Box } from '@mui/system'; + import { Base } from 'src/components/Base'; import { PageLayout } from 'src/components/PageLayout'; diff --git a/src/pages/creer-une-enigme/1.tsx b/src/pages/creer-une-enigme/1.tsx index 35e317c68..9d36222a2 100644 --- a/src/pages/creer-une-enigme/1.tsx +++ b/src/pages/creer-une-enigme/1.tsx @@ -1,7 +1,8 @@ -import { Button, TextField } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; +import { Button, TextField } from '@mui/material'; + import { isEnigme } from 'src/activity-types/anyActivity'; import { ENIGME_TYPES, getCategoryName } from 'src/activity-types/enigme.constants'; import type { EnigmeData } from 'src/activity-types/enigme.types'; diff --git a/src/pages/creer-une-enigme/4.tsx b/src/pages/creer-une-enigme/4.tsx index ef3a4232a..b4d1110ed 100644 --- a/src/pages/creer-une-enigme/4.tsx +++ b/src/pages/creer-une-enigme/4.tsx @@ -1,12 +1,13 @@ -import { Tooltip } from '@mui/material'; -import Backdrop from '@mui/material/Backdrop'; -import Button from '@mui/material/Button'; -import CircularProgress from '@mui/material/CircularProgress'; import classNames from 'classnames'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; +import { Tooltip } from '@mui/material'; +import Backdrop from '@mui/material/Backdrop'; +import Button from '@mui/material/Button'; +import CircularProgress from '@mui/material/CircularProgress'; + import { isEnigme } from 'src/activity-types/anyActivity'; import { ENIGME_TYPES, getCategoryName, getSubcategoryName } from 'src/activity-types/enigme.constants'; import type { EnigmeData } from 'src/activity-types/enigme.types'; diff --git a/src/pages/creer-une-enigme/success.tsx b/src/pages/creer-une-enigme/success.tsx index 1f13df31a..20292a32b 100644 --- a/src/pages/creer-une-enigme/success.tsx +++ b/src/pages/creer-une-enigme/success.tsx @@ -1,7 +1,8 @@ -import { Button } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import { Button } from '@mui/material'; + import { Base } from 'src/components/Base'; import { PageLayout } from 'src/components/PageLayout'; import { bgPage } from 'src/styles/variables.const'; diff --git a/src/pages/creer-une-histoire/1.tsx b/src/pages/creer-une-histoire/1.tsx index 1f37930cd..bc9be1629 100644 --- a/src/pages/creer-une-histoire/1.tsx +++ b/src/pages/creer-une-histoire/1.tsx @@ -1,9 +1,10 @@ -import AddIcon from '@mui/icons-material/Add'; -import { Grid, ButtonBase, FormControl, FormHelperText, InputLabel, MenuItem, Select } from '@mui/material'; import Image from 'next/image'; import { useRouter } from 'next/router'; import React from 'react'; +import AddIcon from '@mui/icons-material/Add'; +import { Grid, ButtonBase, FormControl, FormHelperText, InputLabel, MenuItem, Select } from '@mui/material'; + import { isStory } from 'src/activity-types/anyActivity'; import { DEFAULT_STORY_DATA, ODD_CHOICE } from 'src/activity-types/story.constants'; import { Base } from 'src/components/Base'; diff --git a/src/pages/creer-une-histoire/2.tsx b/src/pages/creer-une-histoire/2.tsx index aef96b018..8605c30d5 100644 --- a/src/pages/creer-une-histoire/2.tsx +++ b/src/pages/creer-une-histoire/2.tsx @@ -1,9 +1,10 @@ -import AddIcon from '@mui/icons-material/Add'; -import { TextField, Grid, ButtonBase } from '@mui/material'; import Image from 'next/image'; import { useRouter } from 'next/router'; import React from 'react'; +import AddIcon from '@mui/icons-material/Add'; +import { TextField, Grid, ButtonBase } from '@mui/material'; + import { isStory } from 'src/activity-types/anyActivity'; import { Base } from 'src/components/Base'; import { KeepRatio } from 'src/components/KeepRatio'; diff --git a/src/pages/creer-une-histoire/3.tsx b/src/pages/creer-une-histoire/3.tsx index 031da1be8..6a7f88c52 100644 --- a/src/pages/creer-une-histoire/3.tsx +++ b/src/pages/creer-une-histoire/3.tsx @@ -1,9 +1,10 @@ -import AddIcon from '@mui/icons-material/Add'; -import { TextField, Grid, ButtonBase } from '@mui/material'; import Image from 'next/image'; import { useRouter } from 'next/router'; import React from 'react'; +import AddIcon from '@mui/icons-material/Add'; +import { TextField, Grid, ButtonBase } from '@mui/material'; + import { isStory } from 'src/activity-types/anyActivity'; import { Base } from 'src/components/Base'; import { KeepRatio } from 'src/components/KeepRatio'; diff --git a/src/pages/creer-une-histoire/4.tsx b/src/pages/creer-une-histoire/4.tsx index 3a88f1228..aacf32548 100644 --- a/src/pages/creer-une-histoire/4.tsx +++ b/src/pages/creer-une-histoire/4.tsx @@ -1,9 +1,10 @@ -import AddIcon from '@mui/icons-material/Add'; -import { TextField, Grid, ButtonBase } from '@mui/material'; import Image from 'next/image'; import { useRouter } from 'next/router'; import React from 'react'; +import AddIcon from '@mui/icons-material/Add'; +import { TextField, Grid, ButtonBase } from '@mui/material'; + import { isStory } from 'src/activity-types/anyActivity'; import { Base } from 'src/components/Base'; import { KeepRatio } from 'src/components/KeepRatio'; diff --git a/src/pages/creer-une-histoire/5.tsx b/src/pages/creer-une-histoire/5.tsx index 996152b03..514defc94 100644 --- a/src/pages/creer-une-histoire/5.tsx +++ b/src/pages/creer-une-histoire/5.tsx @@ -1,8 +1,9 @@ -import { Tooltip, Button, Backdrop, CircularProgress } from '@mui/material'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; +import { Tooltip, Button, Backdrop, CircularProgress } from '@mui/material'; + import { isStory } from 'src/activity-types/anyActivity'; import { Base } from 'src/components/Base'; import { ImageStepContainer } from 'src/components/FinalStep/ImageStepContainer'; diff --git a/src/pages/creer-une-histoire/index.tsx b/src/pages/creer-une-histoire/index.tsx index e37bb9e37..184a02887 100644 --- a/src/pages/creer-une-histoire/index.tsx +++ b/src/pages/creer-une-histoire/index.tsx @@ -1,7 +1,8 @@ -import { Box, Button } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import { Box, Button } from '@mui/material'; + import { Base } from 'src/components/Base'; import { PageLayout } from 'src/components/PageLayout'; diff --git a/src/pages/creer-une-histoire/success.tsx b/src/pages/creer-une-histoire/success.tsx index 9692114b5..cb74e9199 100644 --- a/src/pages/creer-une-histoire/success.tsx +++ b/src/pages/creer-une-histoire/success.tsx @@ -1,7 +1,8 @@ -import { Button } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import { Button } from '@mui/material'; + import { Base } from 'src/components/Base'; import { PageLayout } from 'src/components/PageLayout'; import { bgPage } from 'src/styles/variables.const'; diff --git a/src/pages/familles/1.tsx b/src/pages/familles/1.tsx index 9031bf65a..5c21a4be7 100644 --- a/src/pages/familles/1.tsx +++ b/src/pages/familles/1.tsx @@ -1,9 +1,10 @@ // TODO : keep this import for delayed days logic // import debounce from 'lodash.debounce'; -import { Button, Card, CircularProgress, FormControl, FormControlLabel, Radio, RadioGroup } from '@mui/material'; import { useRouter } from 'next/router'; import React, { useContext, useEffect, useReducer } from 'react'; +import { Button, Card, CircularProgress, FormControl, FormControlLabel, Radio, RadioGroup } from '@mui/material'; + import AccessControl from 'src/components/AccessControl'; import { Base } from 'src/components/Base'; import OverflowContainer from 'src/components/OverflowContainer'; diff --git a/src/pages/familles/2.tsx b/src/pages/familles/2.tsx index ea8ce7cd2..54a100650 100644 --- a/src/pages/familles/2.tsx +++ b/src/pages/familles/2.tsx @@ -1,11 +1,12 @@ // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-nocheck +import { useRouter } from 'next/router'; +import React, { useState, useEffect } from 'react'; + import ModeEditOutlineRoundedIcon from '@mui/icons-material/ModeEditOutlineRounded'; import { TextField } from '@mui/material'; import Button from '@mui/material/Button'; -import { useRouter } from 'next/router'; -import React, { useState, useEffect } from 'react'; import { editStudent } from 'src/api/classroom/student.put'; import AccessControl from 'src/components/AccessControl'; diff --git a/src/pages/familles/3.tsx b/src/pages/familles/3.tsx index e5b5f1927..69788d7d4 100644 --- a/src/pages/familles/3.tsx +++ b/src/pages/familles/3.tsx @@ -1,8 +1,9 @@ -import { Box, Button } from '@mui/material'; import dynamic from 'next/dynamic'; import { useRouter } from 'next/router'; import React, { useEffect, useState } from 'react'; +import { Box, Button } from '@mui/material'; + import AccessControl from 'src/components/AccessControl'; import { Base } from 'src/components/Base'; import { Modal } from 'src/components/Modal'; diff --git a/src/pages/indice-culturel/1.tsx b/src/pages/indice-culturel/1.tsx index 3a2d1892e..df0503cbc 100644 --- a/src/pages/indice-culturel/1.tsx +++ b/src/pages/indice-culturel/1.tsx @@ -1,7 +1,8 @@ -import { Box, TextField } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; +import { Box, TextField } from '@mui/material'; + import { getIndice } from 'src/activity-types/indice.constants'; import type { IndiceData } from 'src/activity-types/indice.types'; import { Base } from 'src/components/Base'; diff --git a/src/pages/indice-culturel/2.tsx b/src/pages/indice-culturel/2.tsx index 107d4da77..c363d1f30 100644 --- a/src/pages/indice-culturel/2.tsx +++ b/src/pages/indice-culturel/2.tsx @@ -1,7 +1,8 @@ -import { Box } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; +import { Box } from '@mui/material'; + import { isIndice } from 'src/activity-types/anyActivity'; import { getIndice } from 'src/activity-types/indice.constants'; import type { IndiceData } from 'src/activity-types/indice.types'; diff --git a/src/pages/indice-culturel/3.tsx b/src/pages/indice-culturel/3.tsx index 47aa6642d..2efc129a0 100644 --- a/src/pages/indice-culturel/3.tsx +++ b/src/pages/indice-culturel/3.tsx @@ -1,12 +1,13 @@ -import { Box, Tooltip } from '@mui/material'; -import Backdrop from '@mui/material/Backdrop'; -import Button from '@mui/material/Button'; -import CircularProgress from '@mui/material/CircularProgress'; import classNames from 'classnames'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; +import { Box, Tooltip } from '@mui/material'; +import Backdrop from '@mui/material/Backdrop'; +import Button from '@mui/material/Button'; +import CircularProgress from '@mui/material/CircularProgress'; + import { isIndice } from 'src/activity-types/anyActivity'; import { getIndice } from 'src/activity-types/indice.constants'; import type { IndiceData } from 'src/activity-types/indice.types'; diff --git a/src/pages/indice-culturel/index.tsx b/src/pages/indice-culturel/index.tsx index f07f9d954..eda4a89f4 100644 --- a/src/pages/indice-culturel/index.tsx +++ b/src/pages/indice-culturel/index.tsx @@ -1,6 +1,7 @@ -import { Box } from '@mui/material'; import React from 'react'; +import { Box } from '@mui/material'; + import { Base } from 'src/components/Base'; import { ActivityChoice } from 'src/components/activities/ActivityChoice'; import ArtIcon from 'src/svg/indice-culturel/art.svg'; diff --git a/src/pages/indice-culturel/success.tsx b/src/pages/indice-culturel/success.tsx index 4939a6bfc..b0b00547b 100644 --- a/src/pages/indice-culturel/success.tsx +++ b/src/pages/indice-culturel/success.tsx @@ -1,7 +1,8 @@ -import { Box, Button } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import { Box, Button } from '@mui/material'; + import { Base } from 'src/components/Base'; import { bgPage } from 'src/styles/variables.const'; import PelicoSouriant from 'src/svg/pelico/pelico-souriant.svg'; diff --git a/src/pages/inscription.tsx b/src/pages/inscription.tsx index 68034ec5e..ca48b6f93 100644 --- a/src/pages/inscription.tsx +++ b/src/pages/inscription.tsx @@ -1,8 +1,9 @@ +import { useRouter } from 'next/router'; +import React, { useEffect, useState } from 'react'; + import Visibility from '@mui/icons-material/Visibility'; import VisibilityOff from '@mui/icons-material/VisibilityOff'; import { Box, Button, Checkbox, FormControlLabel, Grid, IconButton, InputAdornment, Link, TextField, Typography } from '@mui/material'; -import { useRouter } from 'next/router'; -import React, { useEffect, useRef, useState } from 'react'; import LanguageFilter from 'src/components/LanguageFilter'; import { Modal } from 'src/components/Modal'; diff --git a/src/pages/lancer-un-defi/1.tsx b/src/pages/lancer-un-defi/1.tsx index 3e1178178..5d575b9e5 100644 --- a/src/pages/lancer-un-defi/1.tsx +++ b/src/pages/lancer-un-defi/1.tsx @@ -1,7 +1,8 @@ -import { TextField } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; +import { TextField } from '@mui/material'; + import { isDefi } from 'src/activity-types/anyActivity'; import { DEFI, isFree } from 'src/activity-types/defi.constants'; import type { FreeDefiData } from 'src/activity-types/defi.types'; diff --git a/src/pages/lancer-un-defi/3.tsx b/src/pages/lancer-un-defi/3.tsx index 264e7c296..2deabd9e9 100644 --- a/src/pages/lancer-un-defi/3.tsx +++ b/src/pages/lancer-un-defi/3.tsx @@ -1,7 +1,8 @@ -import { TextField, Button } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; +import { TextField, Button } from '@mui/material'; + import { isDefi } from 'src/activity-types/anyActivity'; import { FREE_DEFIS, isFree } from 'src/activity-types/defi.constants'; import type { FreeDefiData } from 'src/activity-types/defi.types'; diff --git a/src/pages/lancer-un-defi/4.tsx b/src/pages/lancer-un-defi/4.tsx index a23493bde..8b67de604 100644 --- a/src/pages/lancer-un-defi/4.tsx +++ b/src/pages/lancer-un-defi/4.tsx @@ -1,12 +1,13 @@ -import { Tooltip } from '@mui/material'; -import Backdrop from '@mui/material/Backdrop'; -import Button from '@mui/material/Button'; -import CircularProgress from '@mui/material/CircularProgress'; import classNames from 'classnames'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; +import { Tooltip } from '@mui/material'; +import Backdrop from '@mui/material/Backdrop'; +import Button from '@mui/material/Button'; +import CircularProgress from '@mui/material/CircularProgress'; + import { isDefi } from 'src/activity-types/anyActivity'; import { isFree, getDefi, DEFI } from 'src/activity-types/defi.constants'; import type { FreeDefiData } from 'src/activity-types/defi.types'; diff --git a/src/pages/lancer-un-defi/culinaire/1.tsx b/src/pages/lancer-un-defi/culinaire/1.tsx index 52bd67eaf..cd719ac7b 100644 --- a/src/pages/lancer-un-defi/culinaire/1.tsx +++ b/src/pages/lancer-un-defi/culinaire/1.tsx @@ -1,9 +1,10 @@ -import AddIcon from '@mui/icons-material/Add'; -import { ButtonBase, Grid, TextField } from '@mui/material'; import Image from 'next/image'; import { useRouter } from 'next/router'; import React from 'react'; +import AddIcon from '@mui/icons-material/Add'; +import { ButtonBase, Grid, TextField } from '@mui/material'; + import { isDefi } from 'src/activity-types/anyActivity'; import { DEFI, isCooking } from 'src/activity-types/defi.constants'; import type { CookingDefiData } from 'src/activity-types/defi.types'; diff --git a/src/pages/lancer-un-defi/culinaire/3.tsx b/src/pages/lancer-un-defi/culinaire/3.tsx index c142ae1cd..e1bdbebc8 100644 --- a/src/pages/lancer-un-defi/culinaire/3.tsx +++ b/src/pages/lancer-un-defi/culinaire/3.tsx @@ -1,7 +1,8 @@ -import { TextField, Button } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; +import { TextField, Button } from '@mui/material'; + import { isDefi } from 'src/activity-types/anyActivity'; import { isCooking, COOKING_DEFIS } from 'src/activity-types/defi.constants'; import type { CookingDefiData } from 'src/activity-types/defi.types'; diff --git a/src/pages/lancer-un-defi/culinaire/4.tsx b/src/pages/lancer-un-defi/culinaire/4.tsx index 5760e5e17..e5705e95d 100644 --- a/src/pages/lancer-un-defi/culinaire/4.tsx +++ b/src/pages/lancer-un-defi/culinaire/4.tsx @@ -1,14 +1,15 @@ -import { Tooltip } from '@mui/material'; -import Backdrop from '@mui/material/Backdrop'; -import Button from '@mui/material/Button'; -import CircularProgress from '@mui/material/CircularProgress'; -import Grid from '@mui/material/Grid'; import classNames from 'classnames'; import Image from 'next/image'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; +import { Tooltip } from '@mui/material'; +import Backdrop from '@mui/material/Backdrop'; +import Button from '@mui/material/Button'; +import CircularProgress from '@mui/material/CircularProgress'; +import Grid from '@mui/material/Grid'; + import { isDefi } from 'src/activity-types/anyActivity'; import { isCooking, getDefi, DEFI } from 'src/activity-types/defi.constants'; import type { CookingDefiData } from 'src/activity-types/defi.types'; diff --git a/src/pages/lancer-un-defi/ecologique/3.tsx b/src/pages/lancer-un-defi/ecologique/3.tsx index 6d375b71f..ab427df3d 100644 --- a/src/pages/lancer-un-defi/ecologique/3.tsx +++ b/src/pages/lancer-un-defi/ecologique/3.tsx @@ -1,7 +1,8 @@ -import { TextField, Button } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; +import { TextField, Button } from '@mui/material'; + import { isDefi } from 'src/activity-types/anyActivity'; import { isEco, ECO_DEFIS } from 'src/activity-types/defi.constants'; import type { EcoDefiData } from 'src/activity-types/defi.types'; diff --git a/src/pages/lancer-un-defi/ecologique/4.tsx b/src/pages/lancer-un-defi/ecologique/4.tsx index 182224f28..61231012f 100644 --- a/src/pages/lancer-un-defi/ecologique/4.tsx +++ b/src/pages/lancer-un-defi/ecologique/4.tsx @@ -1,12 +1,13 @@ -import { Tooltip } from '@mui/material'; -import Backdrop from '@mui/material/Backdrop'; -import Button from '@mui/material/Button'; -import CircularProgress from '@mui/material/CircularProgress'; import classNames from 'classnames'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; +import { Tooltip } from '@mui/material'; +import Backdrop from '@mui/material/Backdrop'; +import Button from '@mui/material/Button'; +import CircularProgress from '@mui/material/CircularProgress'; + import { isDefi } from 'src/activity-types/anyActivity'; import { isEco, getDefi, ECO_ACTIONS, DEFI } from 'src/activity-types/defi.constants'; import type { EcoDefiData } from 'src/activity-types/defi.types'; diff --git a/src/pages/lancer-un-defi/linguistique/1.tsx b/src/pages/lancer-un-defi/linguistique/1.tsx index 9c05217aa..dd269e8c5 100644 --- a/src/pages/lancer-un-defi/linguistique/1.tsx +++ b/src/pages/lancer-un-defi/linguistique/1.tsx @@ -1,8 +1,9 @@ -import { TextField, Autocomplete, FormControlLabel, Grid, Radio, RadioGroup, FormControl } from '@mui/material'; import { useRouter } from 'next/router'; import type { SyntheticEvent } from 'react'; import React from 'react'; +import { TextField, Autocomplete, FormControlLabel, Grid, Radio, RadioGroup, FormControl } from '@mui/material'; + import { isDefi } from 'src/activity-types/anyActivity'; import { DEFI, isLanguage, LANGUAGE_SCHOOL } from 'src/activity-types/defi.constants'; import type { LanguageDefiData } from 'src/activity-types/defi.types'; diff --git a/src/pages/lancer-un-defi/linguistique/2.tsx b/src/pages/lancer-un-defi/linguistique/2.tsx index ea8b16f33..42b0c2962 100644 --- a/src/pages/lancer-un-defi/linguistique/2.tsx +++ b/src/pages/lancer-un-defi/linguistique/2.tsx @@ -1,7 +1,8 @@ -import { TextField, Button } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; +import { TextField, Button } from '@mui/material'; + import { isDefi } from 'src/activity-types/anyActivity'; import { isLanguage, LANGUAGE_THEMES } from 'src/activity-types/defi.constants'; import type { LanguageDefiData } from 'src/activity-types/defi.types'; diff --git a/src/pages/lancer-un-defi/linguistique/4.tsx b/src/pages/lancer-un-defi/linguistique/4.tsx index d6a7fa728..03f4ac1cc 100644 --- a/src/pages/lancer-un-defi/linguistique/4.tsx +++ b/src/pages/lancer-un-defi/linguistique/4.tsx @@ -1,7 +1,8 @@ -import { TextField, Button } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; +import { TextField, Button } from '@mui/material'; + import { isDefi } from 'src/activity-types/anyActivity'; import { isLanguage, LANGUAGE_DEFIS, LANGUAGE_THEMES } from 'src/activity-types/defi.constants'; import type { LanguageDefiData } from 'src/activity-types/defi.types'; diff --git a/src/pages/lancer-un-defi/linguistique/5.tsx b/src/pages/lancer-un-defi/linguistique/5.tsx index a50013a27..d7eb44e93 100644 --- a/src/pages/lancer-un-defi/linguistique/5.tsx +++ b/src/pages/lancer-un-defi/linguistique/5.tsx @@ -1,12 +1,13 @@ -import { Tooltip } from '@mui/material'; -import Backdrop from '@mui/material/Backdrop'; -import Button from '@mui/material/Button'; -import CircularProgress from '@mui/material/CircularProgress'; import classNames from 'classnames'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; +import { Tooltip } from '@mui/material'; +import Backdrop from '@mui/material/Backdrop'; +import Button from '@mui/material/Button'; +import CircularProgress from '@mui/material/CircularProgress'; + import { isDefi } from 'src/activity-types/anyActivity'; import { isLanguage, getDefi, getLanguageTheme, DEFI, LANGUAGE_THEMES } from 'src/activity-types/defi.constants'; import type { LanguageDefiData } from 'src/activity-types/defi.types'; diff --git a/src/pages/lancer-un-defi/success.tsx b/src/pages/lancer-un-defi/success.tsx index 8c1b9ccb8..77d29af96 100644 --- a/src/pages/lancer-un-defi/success.tsx +++ b/src/pages/lancer-un-defi/success.tsx @@ -1,7 +1,8 @@ -import { Button } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import { Button } from '@mui/material'; + import { Base } from 'src/components/Base'; import { PageLayout } from 'src/components/PageLayout'; import { bgPage } from 'src/styles/variables.const'; diff --git a/src/pages/login.tsx b/src/pages/login.tsx index d6bcccaa9..84f36a728 100644 --- a/src/pages/login.tsx +++ b/src/pages/login.tsx @@ -1,8 +1,9 @@ -import { Backdrop, Box, Button, CircularProgress, Grid, Link, Tooltip, Typography } from '@mui/material'; import { useRouter } from 'next/router'; import qs from 'query-string'; import React from 'react'; +import { Backdrop, Box, Button, CircularProgress, Grid, Link, Tooltip, Typography } from '@mui/material'; + import { isRedirectValid } from '../components/accueil/NewHome'; import { UserContext } from 'src/contexts/userContext'; import ArrowBack from 'src/svg/arrow_back.svg'; diff --git a/src/pages/mascotte/1.tsx b/src/pages/mascotte/1.tsx index 9b1fab4af..b7c7acfc8 100644 --- a/src/pages/mascotte/1.tsx +++ b/src/pages/mascotte/1.tsx @@ -1,7 +1,8 @@ -import { TextField, Box } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; +import { TextField, Box } from '@mui/material'; + import { isMascotte } from 'src/activity-types/anyActivity'; import { DEFAULT_MASCOTTE_DATA } from 'src/activity-types/mascotte.constants'; import type { MascotteData } from 'src/activity-types/mascotte.types'; diff --git a/src/pages/mascotte/2.tsx b/src/pages/mascotte/2.tsx index b145e642b..c95fea812 100644 --- a/src/pages/mascotte/2.tsx +++ b/src/pages/mascotte/2.tsx @@ -1,7 +1,8 @@ -import { TextField, Grid, Box } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; +import { TextField, Grid, Box } from '@mui/material'; + import { isMascotte } from 'src/activity-types/anyActivity'; import type { MascotteData } from 'src/activity-types/mascotte.types'; import { Base } from 'src/components/Base'; diff --git a/src/pages/mascotte/3.tsx b/src/pages/mascotte/3.tsx index 688db8606..7531a4d7d 100644 --- a/src/pages/mascotte/3.tsx +++ b/src/pages/mascotte/3.tsx @@ -1,7 +1,8 @@ -import { Grid } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; +import { Grid } from '@mui/material'; + import { isMascotte } from 'src/activity-types/anyActivity'; import type { MascotteData } from 'src/activity-types/mascotte.types'; import { Base } from 'src/components/Base'; diff --git a/src/pages/mascotte/4.tsx b/src/pages/mascotte/4.tsx index 6d125b87c..9a263fd9f 100644 --- a/src/pages/mascotte/4.tsx +++ b/src/pages/mascotte/4.tsx @@ -1,6 +1,7 @@ -import { Checkbox } from '@mui/material'; import React from 'react'; +import { Checkbox } from '@mui/material'; + import type { MascotteData } from 'src/activity-types/mascotte.types'; import { Base } from 'src/components/Base'; import { Steps } from 'src/components/Steps'; diff --git a/src/pages/mascotte/5.tsx b/src/pages/mascotte/5.tsx index 82ab28e7a..c24b0eda9 100644 --- a/src/pages/mascotte/5.tsx +++ b/src/pages/mascotte/5.tsx @@ -1,10 +1,11 @@ -import { Button, Grid, Backdrop, Box, Tooltip } from '@mui/material'; -import CircularProgress from '@mui/material/CircularProgress'; import classNames from 'classnames'; import { useRouter } from 'next/router'; import React from 'react'; import { useQueryClient } from 'react-query'; +import { Button, Grid, Backdrop, Box, Tooltip } from '@mui/material'; +import CircularProgress from '@mui/material/CircularProgress'; + import { isMascotte } from 'src/activity-types/anyActivity'; import { getMascotteContent } from 'src/activity-types/mascotte.constants'; import type { MascotteData } from 'src/activity-types/mascotte.types'; diff --git a/src/pages/mes-videos.tsx b/src/pages/mes-videos.tsx index 9c756b0b0..15c6e98d6 100644 --- a/src/pages/mes-videos.tsx +++ b/src/pages/mes-videos.tsx @@ -1,11 +1,3 @@ -import VisibilityIcon from '@mui/icons-material/Visibility'; -import IconButton from '@mui/material/IconButton'; -import Table from '@mui/material/Table'; -import TableBody from '@mui/material/TableBody'; -import TableCell from '@mui/material/TableCell'; -import TableHead from '@mui/material/TableHead'; -import TableRow from '@mui/material/TableRow'; -import Tooltip from '@mui/material/Tooltip'; import { useSnackbar } from 'notistack'; import React from 'react'; import { useQueryClient } from 'react-query'; diff --git a/src/pages/mon-compte.tsx b/src/pages/mon-compte.tsx index f6eb3647a..2dfb3b60c 100644 --- a/src/pages/mon-compte.tsx +++ b/src/pages/mon-compte.tsx @@ -1,10 +1,11 @@ +import { useSnackbar } from 'notistack'; +import React from 'react'; + import { Alert, AlertTitle, Checkbox, Grid, TextField } from '@mui/material'; import Backdrop from '@mui/material/Backdrop'; import Button from '@mui/material/Button'; import CircularProgress from '@mui/material/CircularProgress'; import NoSsr from '@mui/material/NoSsr'; -import { useSnackbar } from 'notistack'; -import React from 'react'; import { AvatarImg } from 'src/components/Avatar'; import { Base } from 'src/components/Base'; diff --git a/src/pages/parametrer-hymne/1.tsx b/src/pages/parametrer-hymne/1.tsx index bdee724a5..5deee374b 100644 --- a/src/pages/parametrer-hymne/1.tsx +++ b/src/pages/parametrer-hymne/1.tsx @@ -1,8 +1,9 @@ +import { useRouter } from 'next/router'; +import React from 'react'; + import { Box } from '@mui/material'; import Backdrop from '@mui/material/Backdrop'; import CircularProgress from '@mui/material/CircularProgress'; -import { useRouter } from 'next/router'; -import React from 'react'; import styles from '../../styles/parametrer-hymne.module.css'; import { DEFAULT_ANTHEM_DATA } from 'src/activity-types/anthem.constants'; diff --git a/src/pages/parametrer-hymne/2.tsx b/src/pages/parametrer-hymne/2.tsx index 665e5b248..d5410a2f9 100644 --- a/src/pages/parametrer-hymne/2.tsx +++ b/src/pages/parametrer-hymne/2.tsx @@ -1,8 +1,9 @@ -import Backdrop from '@mui/material/Backdrop'; -import CircularProgress from '@mui/material/CircularProgress'; import { useRouter } from 'next/router'; import React from 'react'; +import Backdrop from '@mui/material/Backdrop'; +import CircularProgress from '@mui/material/CircularProgress'; + import styles from '../../styles/parametrer-hymne.module.css'; import { postMixAudio } from 'src/api/audio/audio-mix.post'; import { deleteAudio } from 'src/api/audio/audio.delete'; diff --git a/src/pages/parametrer-hymne/3.tsx b/src/pages/parametrer-hymne/3.tsx index 8a0eaeae8..ca10c35b7 100644 --- a/src/pages/parametrer-hymne/3.tsx +++ b/src/pages/parametrer-hymne/3.tsx @@ -1,7 +1,8 @@ -import { ButtonBase, Card } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; +import { ButtonBase, Card } from '@mui/material'; + import styles from '../../styles/parametrer-hymne.module.css'; import { isAnthem } from 'src/activity-types/anyActivity'; import { Base } from 'src/components/Base'; diff --git a/src/pages/parametrer-hymne/4.tsx b/src/pages/parametrer-hymne/4.tsx index c4b021a29..ceb13c238 100644 --- a/src/pages/parametrer-hymne/4.tsx +++ b/src/pages/parametrer-hymne/4.tsx @@ -1,7 +1,8 @@ -import { ButtonBase, Card } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; +import { ButtonBase, Card } from '@mui/material'; + import styles from '../../styles/parametrer-hymne.module.css'; import { isAnthem } from 'src/activity-types/anyActivity'; import { Base } from 'src/components/Base'; diff --git a/src/pages/parametrer-hymne/5.tsx b/src/pages/parametrer-hymne/5.tsx index 1ec241c61..8acd6eb77 100644 --- a/src/pages/parametrer-hymne/5.tsx +++ b/src/pages/parametrer-hymne/5.tsx @@ -1,11 +1,12 @@ -import Backdrop from '@mui/material/Backdrop'; -import Button from '@mui/material/Button'; -import CircularProgress from '@mui/material/CircularProgress'; import classNames from 'classnames'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; +import Backdrop from '@mui/material/Backdrop'; +import Button from '@mui/material/Button'; +import CircularProgress from '@mui/material/CircularProgress'; + import { isAnthem } from 'src/activity-types/anyActivity'; import { Base } from 'src/components/Base'; import { PageLayout } from 'src/components/PageLayout'; diff --git a/src/pages/parametrer-hymne/success.tsx b/src/pages/parametrer-hymne/success.tsx index 4bc945449..a6fa212a0 100644 --- a/src/pages/parametrer-hymne/success.tsx +++ b/src/pages/parametrer-hymne/success.tsx @@ -1,7 +1,8 @@ -import { Button } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import { Button } from '@mui/material'; + import { Base } from 'src/components/Base'; import { PageLayout } from 'src/components/PageLayout'; import { bgPage } from 'src/styles/variables.const'; diff --git a/src/pages/pelico-profil.tsx b/src/pages/pelico-profil.tsx index 0f4adfb14..d938ab611 100644 --- a/src/pages/pelico-profil.tsx +++ b/src/pages/pelico-profil.tsx @@ -1,6 +1,7 @@ -import { Box } from '@mui/material'; import React, { useEffect, useState } from 'react'; +import { Box } from '@mui/material'; + import { usePelicoPresentation } from 'src/api/pelicoPresentation/pelicoPresentation.get'; import { Base } from 'src/components/Base'; import { PelicoProfilNavigation } from 'src/components/accueil/PelicoProfilNavigation'; diff --git a/src/pages/poser-une-question/1.tsx b/src/pages/poser-une-question/1.tsx index adf8d4d21..2120e074d 100644 --- a/src/pages/poser-une-question/1.tsx +++ b/src/pages/poser-une-question/1.tsx @@ -1,7 +1,8 @@ -import { Button } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; +import { Button } from '@mui/material'; + import { isQuestion } from 'src/activity-types/anyActivity'; import { AvatarImg } from 'src/components/Avatar'; import { Base } from 'src/components/Base'; diff --git a/src/pages/poser-une-question/2.tsx b/src/pages/poser-une-question/2.tsx index 932222603..686206acf 100644 --- a/src/pages/poser-une-question/2.tsx +++ b/src/pages/poser-une-question/2.tsx @@ -1,8 +1,9 @@ -import AddIcon from '@mui/icons-material/Add'; -import { ButtonBase, TextField, Card } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; +import AddIcon from '@mui/icons-material/Add'; +import { ButtonBase, TextField, Card } from '@mui/material'; + import { isQuestion } from 'src/activity-types/anyActivity'; import { Base } from 'src/components/Base'; import { PageLayout } from 'src/components/PageLayout'; diff --git a/src/pages/poser-une-question/3.tsx b/src/pages/poser-une-question/3.tsx index 796965a12..c2f9e6ed0 100644 --- a/src/pages/poser-une-question/3.tsx +++ b/src/pages/poser-une-question/3.tsx @@ -1,13 +1,14 @@ -import { Tooltip } from '@mui/material'; -import Backdrop from '@mui/material/Backdrop'; -import Button from '@mui/material/Button'; -import CircularProgress from '@mui/material/CircularProgress'; import classNames from 'classnames'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; import { useQueryClient } from 'react-query'; +import { Tooltip } from '@mui/material'; +import Backdrop from '@mui/material/Backdrop'; +import Button from '@mui/material/Button'; +import CircularProgress from '@mui/material/CircularProgress'; + import { isQuestion } from 'src/activity-types/anyActivity'; import type { QuestionActivity } from 'src/activity-types/question.types'; import { Base } from 'src/components/Base'; diff --git a/src/pages/poser-une-question/success.tsx b/src/pages/poser-une-question/success.tsx index 1e5421292..be143e51d 100644 --- a/src/pages/poser-une-question/success.tsx +++ b/src/pages/poser-une-question/success.tsx @@ -1,8 +1,9 @@ -import { Button } from '@mui/material'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; +import { Button } from '@mui/material'; + import { Base } from 'src/components/Base'; import { PageLayout } from 'src/components/PageLayout'; import { ActivityContext } from 'src/contexts/activityContext'; diff --git a/src/pages/re-inventer-une-histoire/1.tsx b/src/pages/re-inventer-une-histoire/1.tsx index cd1fb4ab6..d2a87b938 100644 --- a/src/pages/re-inventer-une-histoire/1.tsx +++ b/src/pages/re-inventer-une-histoire/1.tsx @@ -1,9 +1,10 @@ -import AddIcon from '@mui/icons-material/Add'; -import { Grid, ButtonBase, FormControl, FormHelperText, InputLabel, MenuItem, Select } from '@mui/material'; import Image from 'next/image'; import { useRouter } from 'next/router'; import React from 'react'; +import AddIcon from '@mui/icons-material/Add'; +import { Grid, ButtonBase, FormControl, FormHelperText, InputLabel, MenuItem, Select } from '@mui/material'; + import { isStory } from 'src/activity-types/anyActivity'; import { ODD_CHOICE } from 'src/activity-types/story.constants'; import { Base } from 'src/components/Base'; diff --git a/src/pages/re-inventer-une-histoire/2.tsx b/src/pages/re-inventer-une-histoire/2.tsx index 98d65d370..518ac97e3 100644 --- a/src/pages/re-inventer-une-histoire/2.tsx +++ b/src/pages/re-inventer-une-histoire/2.tsx @@ -1,9 +1,10 @@ -import AddIcon from '@mui/icons-material/Add'; -import { TextField, Grid, ButtonBase } from '@mui/material'; import Image from 'next/image'; import { useRouter } from 'next/router'; import React from 'react'; +import AddIcon from '@mui/icons-material/Add'; +import { TextField, Grid, ButtonBase } from '@mui/material'; + import { isStory } from 'src/activity-types/anyActivity'; import { Base } from 'src/components/Base'; import { KeepRatio } from 'src/components/KeepRatio'; diff --git a/src/pages/re-inventer-une-histoire/3.tsx b/src/pages/re-inventer-une-histoire/3.tsx index 9ff754a4f..f2cdd46b4 100644 --- a/src/pages/re-inventer-une-histoire/3.tsx +++ b/src/pages/re-inventer-une-histoire/3.tsx @@ -1,9 +1,10 @@ -import AddIcon from '@mui/icons-material/Add'; -import { TextField, Grid, ButtonBase } from '@mui/material'; import Image from 'next/image'; import { useRouter } from 'next/router'; import React from 'react'; +import AddIcon from '@mui/icons-material/Add'; +import { TextField, Grid, ButtonBase } from '@mui/material'; + import { isStory } from 'src/activity-types/anyActivity'; import { Base } from 'src/components/Base'; import { KeepRatio } from 'src/components/KeepRatio'; diff --git a/src/pages/re-inventer-une-histoire/4.tsx b/src/pages/re-inventer-une-histoire/4.tsx index d2153fc52..bd5a3057c 100644 --- a/src/pages/re-inventer-une-histoire/4.tsx +++ b/src/pages/re-inventer-une-histoire/4.tsx @@ -1,9 +1,10 @@ -import AddIcon from '@mui/icons-material/Add'; -import { TextField, Grid, ButtonBase } from '@mui/material'; import Image from 'next/image'; import { useRouter } from 'next/router'; import React from 'react'; +import AddIcon from '@mui/icons-material/Add'; +import { TextField, Grid, ButtonBase } from '@mui/material'; + import { isStory } from 'src/activity-types/anyActivity'; import { Base } from 'src/components/Base'; import { KeepRatio } from 'src/components/KeepRatio'; diff --git a/src/pages/re-inventer-une-histoire/5.tsx b/src/pages/re-inventer-une-histoire/5.tsx index f0e2c36f7..9ef60b516 100644 --- a/src/pages/re-inventer-une-histoire/5.tsx +++ b/src/pages/re-inventer-une-histoire/5.tsx @@ -1,8 +1,9 @@ -import { Tooltip, Button, Backdrop, CircularProgress } from '@mui/material'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; +import { Tooltip, Button, Backdrop, CircularProgress } from '@mui/material'; + import { isStory } from 'src/activity-types/anyActivity'; import { Base } from 'src/components/Base'; import { ImageStepContainer } from 'src/components/FinalStep/ImageStepContainer'; diff --git a/src/pages/re-inventer-une-histoire/success.tsx b/src/pages/re-inventer-une-histoire/success.tsx index a597ee3aa..036d12888 100644 --- a/src/pages/re-inventer-une-histoire/success.tsx +++ b/src/pages/re-inventer-une-histoire/success.tsx @@ -1,7 +1,8 @@ -import { Button } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import { Button } from '@mui/material'; + import { Base } from 'src/components/Base'; import { PageLayout } from 'src/components/PageLayout'; import { bgPage } from 'src/styles/variables.const'; diff --git a/src/pages/reagir-a-une-activite/3.tsx b/src/pages/reagir-a-une-activite/3.tsx index 46d0468b7..8328e7bcc 100644 --- a/src/pages/reagir-a-une-activite/3.tsx +++ b/src/pages/reagir-a-une-activite/3.tsx @@ -1,12 +1,13 @@ -import { Tooltip } from '@mui/material'; -import Backdrop from '@mui/material/Backdrop'; -import Button from '@mui/material/Button'; -import CircularProgress from '@mui/material/CircularProgress'; import classNames from 'classnames'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; +import { Tooltip } from '@mui/material'; +import Backdrop from '@mui/material/Backdrop'; +import Button from '@mui/material/Button'; +import CircularProgress from '@mui/material/CircularProgress'; + import { isReaction } from 'src/activity-types/anyActivity'; import { Base } from 'src/components/Base'; import { PageLayout } from 'src/components/PageLayout'; diff --git a/src/pages/reagir-a-une-activite/success.tsx b/src/pages/reagir-a-une-activite/success.tsx index cfd63c291..2de1adc84 100644 --- a/src/pages/reagir-a-une-activite/success.tsx +++ b/src/pages/reagir-a-une-activite/success.tsx @@ -1,7 +1,8 @@ -import { Button } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import { Button } from '@mui/material'; + import { Base } from 'src/components/Base'; import { PageLayout } from 'src/components/PageLayout'; import { bgPage } from 'src/styles/variables.const'; diff --git a/src/pages/realiser-un-reportage/1.tsx b/src/pages/realiser-un-reportage/1.tsx index 51b38b271..068397eef 100644 --- a/src/pages/realiser-un-reportage/1.tsx +++ b/src/pages/realiser-un-reportage/1.tsx @@ -1,7 +1,8 @@ -import { TextField } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; +import { TextField } from '@mui/material'; + import { getReportage } from 'src/activity-types/reportage.constants'; import type { ReportageData } from 'src/activity-types/reportage.types'; import { Base } from 'src/components/Base'; diff --git a/src/pages/realiser-un-reportage/3.tsx b/src/pages/realiser-un-reportage/3.tsx index a01f0a172..da607ce5e 100644 --- a/src/pages/realiser-un-reportage/3.tsx +++ b/src/pages/realiser-un-reportage/3.tsx @@ -1,12 +1,13 @@ -import { Tooltip } from '@mui/material'; -import Backdrop from '@mui/material/Backdrop'; -import Button from '@mui/material/Button'; -import CircularProgress from '@mui/material/CircularProgress'; import classNames from 'classnames'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; +import { Tooltip } from '@mui/material'; +import Backdrop from '@mui/material/Backdrop'; +import Button from '@mui/material/Button'; +import CircularProgress from '@mui/material/CircularProgress'; + import { isReportage } from 'src/activity-types/anyActivity'; import { getReportage } from 'src/activity-types/reportage.constants'; import type { ReportageData } from 'src/activity-types/reportage.types'; diff --git a/src/pages/realiser-un-reportage/success.tsx b/src/pages/realiser-un-reportage/success.tsx index 8dc302473..e3e4c11d5 100644 --- a/src/pages/realiser-un-reportage/success.tsx +++ b/src/pages/realiser-un-reportage/success.tsx @@ -1,7 +1,8 @@ -import { Button } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import { Button } from '@mui/material'; + import { Base } from 'src/components/Base'; import { PageLayout } from 'src/components/PageLayout'; import { bgPage } from 'src/styles/variables.const'; diff --git a/src/pages/reset-password.tsx b/src/pages/reset-password.tsx index 59cd14a96..2084f52ef 100644 --- a/src/pages/reset-password.tsx +++ b/src/pages/reset-password.tsx @@ -1,7 +1,8 @@ -import { Button, Link, TextField, Typography, Backdrop, CircularProgress, Grid, Box } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; +import { Button, Link, TextField, Typography, Backdrop, CircularProgress, Grid, Box } from '@mui/material'; + import ArrowBack from 'src/svg/arrow_back.svg'; import Logo from 'src/svg/logo_1village_famille.svg'; import PelicoSouriant from 'src/svg/pelico/pelico-souriant.svg'; diff --git a/src/pages/se-presenter/success.tsx b/src/pages/se-presenter/success.tsx index 26e650fd4..d26963992 100644 --- a/src/pages/se-presenter/success.tsx +++ b/src/pages/se-presenter/success.tsx @@ -1,7 +1,8 @@ -import { Button } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import { Button } from '@mui/material'; + import { isMascotte } from 'src/activity-types/anyActivity'; import { Base } from 'src/components/Base'; import { ActivityContext } from 'src/contexts/activityContext'; diff --git a/src/pages/se-presenter/thematique/4.tsx b/src/pages/se-presenter/thematique/4.tsx index 1efd1dad9..8c2e7e1e5 100644 --- a/src/pages/se-presenter/thematique/4.tsx +++ b/src/pages/se-presenter/thematique/4.tsx @@ -1,10 +1,11 @@ +import Link from 'next/link'; +import { useRouter } from 'next/router'; +import React from 'react'; + import { Tooltip } from '@mui/material'; import Backdrop from '@mui/material/Backdrop'; import Button from '@mui/material/Button'; import CircularProgress from '@mui/material/CircularProgress'; -import Link from 'next/link'; -import { useRouter } from 'next/router'; -import React from 'react'; import { isPresentation } from 'src/activity-types/anyActivity'; import { PRESENTATION_THEMATIQUE } from 'src/activity-types/presentation.constants'; diff --git a/src/pages/symbole/1.tsx b/src/pages/symbole/1.tsx index 1241dec75..41b22c6db 100644 --- a/src/pages/symbole/1.tsx +++ b/src/pages/symbole/1.tsx @@ -1,7 +1,8 @@ -import { TextField } from '@mui/material'; import { useRouter } from 'next/router'; import React from 'react'; +import { TextField } from '@mui/material'; + import { getSymbol } from 'src/activity-types/symbol.constants'; import type { SymbolData } from 'src/activity-types/symbol.types'; import { Base } from 'src/components/Base'; diff --git a/src/pages/symbole/3.tsx b/src/pages/symbole/3.tsx index c50fbb262..43dea64b5 100644 --- a/src/pages/symbole/3.tsx +++ b/src/pages/symbole/3.tsx @@ -1,12 +1,13 @@ -import { Tooltip } from '@mui/material'; -import Backdrop from '@mui/material/Backdrop'; -import Button from '@mui/material/Button'; -import CircularProgress from '@mui/material/CircularProgress'; import classNames from 'classnames'; import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; +import { Tooltip } from '@mui/material'; +import Backdrop from '@mui/material/Backdrop'; +import Button from '@mui/material/Button'; +import CircularProgress from '@mui/material/CircularProgress'; + import { isSymbol } from 'src/activity-types/anyActivity'; import { getSymbol } from 'src/activity-types/symbol.constants'; import type { SymbolData } from 'src/activity-types/symbol.types'; diff --git a/src/pages/symbole/success.tsx b/src/pages/symbole/success.tsx index 773010459..74dbe8538 100644 --- a/src/pages/symbole/success.tsx +++ b/src/pages/symbole/success.tsx @@ -1,7 +1,8 @@ -import { Button } from '@mui/material'; import Link from 'next/link'; import React from 'react'; +import { Button } from '@mui/material'; + import { Base } from 'src/components/Base'; import { PageLayout } from 'src/components/PageLayout'; import { bgPage } from 'src/styles/variables.const'; diff --git a/src/pages/update-password.tsx b/src/pages/update-password.tsx index 4adcf3d33..569eab604 100644 --- a/src/pages/update-password.tsx +++ b/src/pages/update-password.tsx @@ -1,8 +1,9 @@ +import { useRouter } from 'next/router'; +import React, { useEffect, useState } from 'react'; + import Visibility from '@mui/icons-material/Visibility'; import VisibilityOff from '@mui/icons-material/VisibilityOff'; import { Button, IconButton, InputAdornment, Link, TextField } from '@mui/material'; -import { useRouter } from 'next/router'; -import React, { useEffect, useRef, useState } from 'react'; import { KeepRatio } from '../components/KeepRatio'; import PasswordMessagesDisplayer from 'src/components/PasswordMessagesDisplayer'; diff --git a/src/pages/user-verified.tsx b/src/pages/user-verified.tsx index 37d3f1d70..dfab25a96 100644 --- a/src/pages/user-verified.tsx +++ b/src/pages/user-verified.tsx @@ -1,7 +1,8 @@ -import { Box, Grid, Link, Typography } from '@mui/material'; import { useRouter } from 'next/router'; import React, { useContext, useEffect, useRef } from 'react'; +import { Box, Grid, Link, Typography } from '@mui/material'; + import { UserContext } from 'src/contexts/userContext'; import { useUserRequests } from 'src/services/useUsers'; import ArrowBack from 'src/svg/arrow_back.svg';