diff --git a/src/components/Admin/Admin.tsx b/src/components/Admin/Admin.tsx index 5b7e8a14..cdf0cf52 100644 --- a/src/components/Admin/Admin.tsx +++ b/src/components/Admin/Admin.tsx @@ -1,8 +1,8 @@ import {FC} from 'react' import {Admin as ReactAdmin, Resource} from 'react-admin' +import {AdminLayout} from './AdminLayout' import {dataProvider} from './dataProvider' -import {AdminLayout} from './layout' import {FlatpageCreate} from './resources/base/flat-page/FlatpageCreate' import {FlatpageEdit} from './resources/base/flat-page/FlatpageEdit' import {FlatpageList} from './resources/base/flat-page/FlatpageList' diff --git a/src/components/Admin/AdminLayout.tsx b/src/components/Admin/AdminLayout.tsx new file mode 100644 index 00000000..d0801197 --- /dev/null +++ b/src/components/Admin/AdminLayout.tsx @@ -0,0 +1,39 @@ +import {Home, Logout} from '@mui/icons-material/' +import {Button, Stack, Typography} from '@mui/material' +import {useRouter} from 'next/router' +import {AppBar, Layout, LayoutProps, useLogout} from 'react-admin' + +const AppMenuBar = () => { + const router = useRouter() + const logout = useLogout() + + return ( + <> + + + + + + } + /> + + ) +} + +export const AdminLayout = (props: LayoutProps) => { + return +} diff --git a/src/components/Admin/layout.tsx b/src/components/Admin/layout.tsx deleted file mode 100644 index 617ffc58..00000000 --- a/src/components/Admin/layout.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import HomeIcon from '@mui/icons-material/Home' -import {Box, IconButton, Tooltip} from '@mui/material' -import {useRouter} from 'next/router' -import {AppBar, Layout, LayoutProps} from 'react-admin' - -const AppMenuBar = () => { - const router = useRouter() - - return ( - <> - - - - router.push('/')}> - - - - - - ) -} - -export const AdminLayout = (props: LayoutProps) => { - return -}