mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
new linting, make sure code is type safe
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
import { useContext, useState } from 'react';
|
||||
import type { ChangeEventHandler, FC } from 'react';
|
||||
|
||||
import AccountCircleIcon from '@mui/icons-material/AccountCircle';
|
||||
import AssessmentIcon from '@mui/icons-material/Assessment';
|
||||
import CategoryIcon from '@mui/icons-material/Category';
|
||||
@@ -9,28 +12,23 @@ import PersonIcon from '@mui/icons-material/Person';
|
||||
import PlaylistAddIcon from '@mui/icons-material/PlaylistAdd';
|
||||
import SensorsIcon from '@mui/icons-material/Sensors';
|
||||
import SettingsIcon from '@mui/icons-material/Settings';
|
||||
|
||||
import {
|
||||
Divider,
|
||||
List,
|
||||
Avatar,
|
||||
Box,
|
||||
Button,
|
||||
Popover,
|
||||
Avatar,
|
||||
MenuItem,
|
||||
TextField,
|
||||
Divider,
|
||||
List,
|
||||
ListItem,
|
||||
ListItemButton,
|
||||
ListItemIcon,
|
||||
ListItemText
|
||||
ListItemText,
|
||||
MenuItem,
|
||||
Popover,
|
||||
TextField
|
||||
} from '@mui/material';
|
||||
|
||||
import { useContext, useState } from 'react';
|
||||
import type { Locales } from 'i18n/i18n-types';
|
||||
import type { FC, ChangeEventHandler } from 'react';
|
||||
import LayoutMenuItem from 'components/layout/LayoutMenuItem';
|
||||
import { AuthenticatedContext } from 'contexts/authentication';
|
||||
|
||||
import DEflag from 'i18n/DE.svg';
|
||||
import FRflag from 'i18n/FR.svg';
|
||||
import GBflag from 'i18n/GB.svg';
|
||||
@@ -41,8 +39,8 @@ import PLflag from 'i18n/PL.svg';
|
||||
import SKflag from 'i18n/SK.svg';
|
||||
import SVflag from 'i18n/SV.svg';
|
||||
import TRflag from 'i18n/TR.svg';
|
||||
|
||||
import { I18nContext } from 'i18n/i18n-react';
|
||||
import type { Locales } from 'i18n/i18n-types';
|
||||
import { loadLocaleAsync } from 'i18n/i18n-util.async';
|
||||
|
||||
const LayoutMenu: FC = () => {
|
||||
@@ -63,7 +61,7 @@ const LayoutMenu: FC = () => {
|
||||
setLocale(loc);
|
||||
};
|
||||
|
||||
const handleClick = (event: any) => {
|
||||
const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {
|
||||
setAnchorEl(event.currentTarget);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user