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