Import react components

This commit is contained in:
Nicola Benaglia 2025-04-26 16:59:39 +02:00
parent 5daf76ace6
commit a468e9f406

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import { forwardRef, Fragment, ReactElement, Ref, useEffect } from 'react';
import Dialog from '@mui/material/Dialog'; import Dialog from '@mui/material/Dialog';
import AppBar from '@mui/material/AppBar'; import AppBar from '@mui/material/AppBar';
import Toolbar from '@mui/material/Toolbar'; import Toolbar from '@mui/material/Toolbar';
@ -44,11 +44,11 @@ const LocalNodeSwitch = styled(Switch)(({ theme }) => ({
}, },
})); }));
const Transition = React.forwardRef(function Transition( const Transition = forwardRef(function Transition(
props: TransitionProps & { props: TransitionProps & {
children: React.ReactElement; children: ReactElement;
}, },
ref: React.Ref<unknown> ref: Ref<unknown>
) { ) {
return <Slide direction="up" ref={ref} {...props} />; return <Slide direction="up" ref={ref} {...props} />;
}); });
@ -111,12 +111,12 @@ export const Settings = ({ address, open, setOpen }) => {
} }
}; };
React.useEffect(() => { useEffect(() => {
getUserSettings(); getUserSettings();
}, []); }, []);
return ( return (
<React.Fragment> <Fragment>
<Dialog <Dialog
fullScreen fullScreen
open={open} open={open}
@ -185,6 +185,6 @@ export const Settings = ({ address, open, setOpen }) => {
)} )}
</Box> </Box>
</Dialog> </Dialog>
</React.Fragment> </Fragment>
); );
}; };