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:
@@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
import React, { useState } 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';
|
||||
@@ -18,6 +17,7 @@ import TextField from '@mui/material/TextField';
|
||||
import Button from '@mui/material/Button';
|
||||
import { EditTextPreferenceProps } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { ListItemButton } from '@mui/material';
|
||||
|
||||
export default function EditTextPreference(props: EditTextPreferenceProps) {
|
||||
const { t } = useTranslation();
|
||||
@@ -42,9 +42,9 @@ export default function EditTextPreference(props: EditTextPreferenceProps) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<ListItem button onClick={() => setDialogOpen(true)}>
|
||||
<ListItemButton onClick={() => setDialogOpen(true)}>
|
||||
<ListItemText primary={title} secondary={summary} />
|
||||
</ListItem>
|
||||
</ListItemButton>
|
||||
<Dialog open={dialogOpen} onClose={handleDialogCancel}>
|
||||
<DialogTitle>{dialogTitle}</DialogTitle>
|
||||
<DialogContent>
|
||||
|
||||
Reference in New Issue
Block a user