Skip to content

Commit

Permalink
Reorder Layout params + make Settings page the same as the otheri n t…
Browse files Browse the repository at this point in the history
…erms of layout
  • Loading branch information
Svetlozar Kondakov committed Apr 18, 2024
1 parent 3e5661a commit c987682
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const App: React.FC<AppProps> = ({ signOut, user }) => {
return (
<ThemeProvider theme={theme}>
<Router>
<Layout signOut={signOut} user={user}>
<Layout user={user} signOut={signOut}>
<Routes>
{routes.map((route, index) => (
<Route key={index} path={route.path} element={route.element} />
Expand Down
2 changes: 1 addition & 1 deletion src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const environmentOptions: environmentOptionType[] = [
{ value: 'localhost', label: 'Localhost' },
];

const Layout: React.FC<{ children: React.ReactNode, signOut: ((data?: any) => void) | undefined, user: AuthUser | undefined }> = ({ children, signOut, user }) => {
const Layout: React.FC<{ children: React.ReactNode, user: AuthUser | undefined, signOut: ((data?: any) => void) | undefined }> = ({ children, user, signOut }) => {
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
const [environment, setEnvironment] = useState(environmentOptions[0].value);
const isMenuOpen = Boolean(anchorEl);
Expand Down
9 changes: 5 additions & 4 deletions src/pages/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ const Settings: React.FC = () => {
}, []);

return (
<div>
<Typography variant="h4">Settings</Typography>
<Typography paragraph>This is the settings page of the admin dashboard.</Typography>
<>
<Box mt={2} mb={4}>
<Typography variant="h4">Settings</Typography>
</Box>
<Box
display="flex"
flexDirection="column"
Expand All @@ -27,7 +28,7 @@ const Settings: React.FC = () => {
</Typography>
</Box>
</Box>
</div>
</>
);
};

Expand Down

0 comments on commit c987682

Please sign in to comment.