added cargoType
This commit is contained in:
21
src/app/[locale]/dashboard/forbidden/create/page.tsx
Normal file
21
src/app/[locale]/dashboard/forbidden/create/page.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
'use client';
|
||||
|
||||
import Loader from '@/components/common/Loader';
|
||||
import { party_requests } from '@/data/party/party.requests';
|
||||
import useRequest from '@/hooks/useRequest';
|
||||
import DashboardCreateForbiddenPage from '@/routes/private/forbidden-create/DashboardCreateForbiddenPage';
|
||||
|
||||
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 <DashboardCreateForbiddenPage partiesData={partiesData.data} />;
|
||||
}
|
||||
Reference in New Issue
Block a user