Skip to content

Commit

Permalink
typescript error
Browse files Browse the repository at this point in the history
  • Loading branch information
dodoLaprovence committed Dec 17, 2024
1 parent 1794819 commit d606a0c
Show file tree
Hide file tree
Showing 300 changed files with 822 additions and 543 deletions.
4 changes: 2 additions & 2 deletions src/api/statistics/statistics.get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
5 changes: 3 additions & 2 deletions src/components/Avatar.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 2 additions & 1 deletion src/components/Base.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 2 additions & 1 deletion src/components/FinalStep/ImageStepContainer.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 2 additions & 1 deletion src/components/H5pOLD.tsx
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
7 changes: 4 additions & 3 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 2 additions & 1 deletion src/components/LanguageFilter.tsx
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
1 change: 1 addition & 0 deletions src/components/Map/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
3 changes: 2 additions & 1 deletion src/components/Modal.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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';
Expand Down
5 changes: 3 additions & 2 deletions src/components/Navigation.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 2 additions & 1 deletion src/components/NavigationMobile.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
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';
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';
Expand Down
3 changes: 2 additions & 1 deletion src/components/PageLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Box } from '@mui/material';
import React from 'react';

import { Box } from '@mui/material';

type PageLayoutProps = {
children: React.ReactNode;
};
Expand Down
3 changes: 2 additions & 1 deletion src/components/PaginationNav/PaginationNav.tsx
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/components/SearchField.tsx
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
5 changes: 3 additions & 2 deletions src/components/Steps.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
5 changes: 3 additions & 2 deletions src/components/StepsButtons.tsx
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
7 changes: 4 additions & 3 deletions src/components/SuggestionCarousel/SuggestionCarousel.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 2 additions & 1 deletion src/components/VideoTable.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 2 additions & 1 deletion src/components/VillageMonde.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 2 additions & 1 deletion src/components/VillageSelect.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
5 changes: 3 additions & 2 deletions src/components/WelcomeModal/FirstPhase.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 2 additions & 1 deletion src/components/WelcomeModal/SecondPhase.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 2 additions & 1 deletion src/components/WelcomeModal/ThirdPhase.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 2 additions & 1 deletion src/components/WorldMap/Popover.tsx
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
9 changes: 5 additions & 4 deletions src/components/WorldMap/WorldMap.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
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';
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';
Expand Down
3 changes: 2 additions & 1 deletion src/components/WorldMap/use-full-screen.tsx
Original file line number Diff line number Diff line change
@@ -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<HTMLDivElement>(null);
Expand Down
3 changes: 2 additions & 1 deletion src/components/accueil/Filters/FilterSelect.tsx
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
3 changes: 2 additions & 1 deletion src/components/accueil/Filters/Filters.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 2 additions & 1 deletion src/components/accueil/LastActivities.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 2 additions & 1 deletion src/components/accueil/LinkChild.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 2 additions & 1 deletion src/components/accueil/NewHome.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 2 additions & 1 deletion src/components/accueil/PelicoProfilNavigation.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 2 additions & 1 deletion src/components/accueil/RightNavigation.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 2 additions & 1 deletion src/components/accueil/SubHeader.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 2 additions & 1 deletion src/components/accueil/VideoPresentation.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
Loading

0 comments on commit d606a0c

Please sign in to comment.