created Components directory

This commit is contained in:
2025-01-16 13:47:21 +01:00
parent 29faa6cc30
commit 261d957dbd
10 changed files with 17 additions and 15 deletions

View File

@@ -7,13 +7,13 @@ import {
} from "react-admin"; } from "react-admin";
//import { Layout } from "./Layout";// //import { Layout } from "./Layout";//
import { dataProvider } from "./dataProvider"; import { dataProvider } from "./dataProvider";
import {UserList} from "./Users.tsx"; import {UserList} from "./Components/Users.tsx";
import {UserEdit} from "./UserEdit.tsx"; import {UserEdit} from "./Components/UserEdit.tsx";
import {PostEdit} from "./PostEdit.tsx"; import {PostEdit} from "./Components/PostEdit.tsx";
import {CommentEdit} from "./CommentEdit.tsx"; import {CommentEdit} from "./Components/CommentEdit.tsx";
import {AlbumEdit} from "./AlbumEdit.tsx"; import {AlbumEdit} from "./Components/AlbumEdit.tsx";
import {PhotoEdit} from "./PhotoEdit.tsx"; import {PhotoEdit} from "./Components/PhotoEdit.tsx";
import {MyLayout} from "./MyLayout.tsx"; import {MyLayout} from "./Components/MyLayout.tsx";
export const App = () => ( export const App = () => (
<Admin layout={MyLayout} dataProvider={dataProvider}> <Admin layout={MyLayout} dataProvider={dataProvider}>

View File

@@ -1,9 +1,10 @@
import {AppBar} from "react-admin"; import {AppBar} from "react-admin";
import {yellow} from "@mui/material/colors";
export const MyAppBar = () => ( export const MyAppBar = () => (
<AppBar <AppBar
sx = {{ sx = {{
backgroundColor: "#ffeb3b", backgroundColor: yellow[500],
}} }}
/> />
); );

View File

@@ -0,0 +1,8 @@
import {Layout} from 'react-admin';
import {MyAppBar} from "./MyAppBar.tsx";
export const MyLayout = ({ children } ) => (
<Layout appBar={MyAppBar} >
{children}
</Layout>
);

View File

@@ -1,7 +0,0 @@
import {Layout} from 'react-admin';
import {MyAppBar} from "./MyAppBar";
export const MyLayout = ({ children } ) => (<Layout appBar={MyAppBar} >
{children}
</Layout>
);