init
This commit is contained in:
9
src/app/[locale]/dashboard/packets/create/loading.tsx
Normal file
9
src/app/[locale]/dashboard/packets/create/loading.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { CircularProgress, Stack } from '@mui/material';
|
||||
|
||||
export default function DashboardLoading() {
|
||||
return (
|
||||
<Stack justifyContent={'center'} alignItems={'center'} p={8}>
|
||||
<CircularProgress size={'64px'} />
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
22
src/app/[locale]/dashboard/packets/create/page.tsx
Normal file
22
src/app/[locale]/dashboard/packets/create/page.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
'use client';
|
||||
|
||||
import DashboardCreateBoxPage from '@/routes/private/boxes-create/DashboardCreateBox';
|
||||
import useRequest from '@/hooks/useRequest';
|
||||
import { party_requests } from '@/data/party/party.requests';
|
||||
import Loader from '@/components/common/Loader';
|
||||
import React from 'react';
|
||||
|
||||
export default function Home() {
|
||||
const partiesData = useRequest(() => party_requests.getAll({ status: 'COLLECTING' }), {
|
||||
selectData(data) {
|
||||
return data.data.data.data.map(p => ({ value: p.id, label: p.name }));
|
||||
},
|
||||
placeholderData: [],
|
||||
});
|
||||
|
||||
if (partiesData.loading || !partiesData.data) {
|
||||
return <Loader p={8} size={96} />;
|
||||
}
|
||||
|
||||
return <DashboardCreateBoxPage partiesData={partiesData.data} />;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { CircularProgress, Stack } from '@mui/material';
|
||||
|
||||
export default function DashboardLoading() {
|
||||
return (
|
||||
<Stack justifyContent={'center'} alignItems={'center'} p={8}>
|
||||
<CircularProgress size={'64px'} />
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import DashboardEditBoxPage from '@/routes/private/boxes-create/DashboardEditBox';
|
||||
|
||||
export default function Home() {
|
||||
return <DashboardEditBoxPage />;
|
||||
}
|
||||
5
src/app/[locale]/dashboard/packets/page.tsx
Normal file
5
src/app/[locale]/dashboard/packets/page.tsx
Normal file
@@ -0,0 +1,5 @@
|
||||
import DashboardBoxesPage from '@/routes/private/boxes/DashboardBoxesPage';
|
||||
|
||||
export default function Home() {
|
||||
return <DashboardBoxesPage />;
|
||||
}
|
||||
Reference in New Issue
Block a user