From 045fac7e97f0b00784f0af7896c9cb98290b71b4 Mon Sep 17 00:00:00 2001 From: Aria Moradi Date: Wed, 17 Nov 2021 14:28:23 +0330 Subject: [PATCH] migrate LangSelect to Mui 5 (#86) --- src/components/navbar/action/LangSelect.tsx | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/components/navbar/action/LangSelect.tsx b/src/components/navbar/action/LangSelect.tsx index 615da2e2..9e992fc9 100644 --- a/src/components/navbar/action/LangSelect.tsx +++ b/src/components/navbar/action/LangSelect.tsx @@ -6,8 +6,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ import React, { useState } from 'react'; -import makeStyles from '@mui/styles/makeStyles'; -import createStyles from '@mui/styles/createStyles'; import Button from '@mui/material/Button'; import DialogTitle from '@mui/material/DialogTitle'; import DialogContent from '@mui/material/DialogContent'; @@ -21,13 +19,6 @@ import ListItem from '@mui/material/ListItem'; import { langCodeToName } from 'util/language'; import cloneObject from 'util/cloneObject'; -const useStyles = makeStyles(() => createStyles({ - paper: { - maxHeight: 435, - width: '80%', - }, -})); - function removeAll(firstList: any[], secondList: any[]) { secondList.forEach((item) => { const index = firstList.indexOf(item); @@ -54,7 +45,6 @@ export default function LangSelect(props: IProps) { const [mShownLangs, setMShownLangs] = useState( removeAll(cloneObject(shownLangs), forcedLangs!), ); - const classes = useStyles(); const [open, setOpen] = useState(false); const handleCancel = () => { @@ -90,12 +80,17 @@ export default function LangSelect(props: IProps) { Enabled Languages - + {allLangs.map((lang) => (