Feature/update dependency mui to v5.x (#332)

* Update dependency "mui" to v5.x

Update to v5.13.3

Fixes issue of "SxProps" not being exported by "@mui/material"

* Update dependency "mui" to v5.x - Fix grid item size

Update to v5.13.3

Fixes issue of "SxProps" not being exported by "@mui/material"

* Update dependency "mui" to v5.x - Replace "ListItem" with "ListItemButton"

* Update dependency "mui" to v5.x - Fix tsc issue

* Update dependency "mui" to v5.x - Prevent reader white screen

Due to "initialChapter" being a function returning an object, it causes a re-render everytime due to it (the object) being used as a dependency.
This caused a white screen when skipping to the previous or next chapter
This commit is contained in:
schroda
2023-06-04 21:13:07 +02:00
committed by GitHub
parent 6911f60eb4
commit 1ce27ea939
11 changed files with 192 additions and 120 deletions

View File

@@ -7,7 +7,6 @@
*/
import React, { useState, useEffect } from 'react';
import ListItem from '@mui/material/ListItem';
import ListItemText from '@mui/material/ListItemText';
import Dialog from '@mui/material/Dialog';
import DialogTitle from '@mui/material/DialogTitle';
@@ -19,6 +18,7 @@ import FormControlLabel from '@mui/material/FormControlLabel';
import Button from '@mui/material/Button';
import { ListPreferenceProps } from 'typings';
import { useTranslation } from 'react-i18next';
import { ListItemButton } from '@mui/material';
interface IListDialogProps {
value: string;
@@ -123,9 +123,9 @@ export default function ListPreference(props: ListPreferenceProps) {
return (
<>
<ListItem button onClick={() => setDialogOpen(true)}>
<ListItemButton onClick={() => setDialogOpen(true)}>
<ListItemText primary={title} secondary={getSummary()} />
</ListItem>
</ListItemButton>
<ListDialog
title={title}
open={dialogOpen}