2025-01-28 10:56:05 +01:00
|
|
|
import { Admin, ListGuesser, Resource, ShowGuesser } from "react-admin";
|
2025-01-16 10:18:09 +01:00
|
|
|
//import { Layout } from "./Layout";//
|
2025-01-06 12:59:58 +01:00
|
|
|
import { dataProvider } from "./dataProvider";
|
2025-01-28 10:56:05 +01:00
|
|
|
import { UserList } from "./Components/users/Users.tsx";
|
|
|
|
|
import { UserEdit } from "./Components/users/UserEdit.tsx";
|
|
|
|
|
import { PostEdit } from "./Components/PostEdit.tsx";
|
|
|
|
|
import { CommentEdit } from "./Components/CommentEdit.tsx";
|
|
|
|
|
import { AlbumEdit } from "./Components/AlbumEdit.tsx";
|
|
|
|
|
import { PhotoEdit } from "./Components/PhotoEdit.tsx";
|
|
|
|
|
import { MyLayout } from "./Components/MyLayout.tsx";
|
|
|
|
|
import { UserShow } from "./Components/users/UserShow.tsx";
|
|
|
|
|
import { CommentShow } from "./Components/CommentShow.tsx";
|
|
|
|
|
import { PostShow } from "./Components/PostShow.tsx";
|
|
|
|
|
import { PostList } from "./Components/PostList.tsx";
|
2025-01-06 12:59:58 +01:00
|
|
|
|
|
|
|
|
export const App = () => (
|
2025-01-16 10:18:09 +01:00
|
|
|
<Admin layout={MyLayout} dataProvider={dataProvider}>
|
2025-01-28 10:56:05 +01:00
|
|
|
<Resource name="users" list={UserList} edit={UserEdit} show={UserShow} />
|
|
|
|
|
<Resource name="posts" list={PostList} edit={PostEdit} show={PostShow} />
|
2025-01-06 12:59:58 +01:00
|
|
|
<Resource
|
2025-01-28 10:56:05 +01:00
|
|
|
name="comments"
|
|
|
|
|
list={ListGuesser}
|
|
|
|
|
edit={CommentEdit}
|
|
|
|
|
show={CommentShow}
|
2025-01-06 12:59:58 +01:00
|
|
|
/>
|
|
|
|
|
<Resource
|
2025-01-28 10:56:05 +01:00
|
|
|
name="albums"
|
|
|
|
|
list={ListGuesser}
|
|
|
|
|
edit={AlbumEdit}
|
|
|
|
|
show={ShowGuesser}
|
2025-01-06 12:59:58 +01:00
|
|
|
/>
|
|
|
|
|
<Resource
|
2025-01-28 10:56:05 +01:00
|
|
|
name="photos"
|
|
|
|
|
list={ListGuesser}
|
|
|
|
|
edit={PhotoEdit}
|
|
|
|
|
show={ShowGuesser}
|
2025-01-06 12:59:58 +01:00
|
|
|
/>
|
|
|
|
|
</Admin>
|
2025-01-28 10:56:05 +01:00
|
|
|
);
|