moved all the pages into [locale]
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
import { LocationEditForm } from '@/app/ui/LocationEditForm';
|
||||
import { YearMonth } from '@/app/lib/db-types';
|
||||
|
||||
export default async function LocationAddPage({ yearMonth }: { yearMonth:YearMonth }) {
|
||||
return (<LocationEditForm yearMonth={yearMonth} />);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
import { parseYearMonth } from '@/app/lib/format';
|
||||
import LocationAddPage from './LocationAddPage';
|
||||
import { Main } from '@/app/ui/Main';
|
||||
|
||||
export default async function Page({ params:{ id } }: { params: { id:string } }) {
|
||||
return (
|
||||
<Main>
|
||||
<LocationAddPage yearMonth={ parseYearMonth(id) } />
|
||||
</Main>
|
||||
);
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
import { notFound } from 'next/navigation';
|
||||
import { fetchLocationById } from '@/app/lib/actions/locationActions';
|
||||
import { LocationDeleteForm } from '@/app/ui/LocationDeleteForm';
|
||||
|
||||
export const LocationDeletePage = async ({ locationId }: { locationId:string }) => {
|
||||
|
||||
const location = await fetchLocationById(locationId);
|
||||
|
||||
if (!location) {
|
||||
return(notFound());
|
||||
}
|
||||
|
||||
return (<LocationDeleteForm location={location} />);
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
import { NotFoundPage } from '@/app/ui/NotFoundPage';
|
||||
|
||||
const BillingLocationNotFound = () =>
|
||||
<NotFoundPage title="404 Billing Location Not Found" description="Could not find the requested Billing Location." />;
|
||||
|
||||
export default BillingLocationNotFound;
|
||||
@@ -1,19 +0,0 @@
|
||||
import { notFound } from 'next/navigation';
|
||||
import { fetchLocationById } from '@/app/lib/actions/locationActions';
|
||||
import { LocationDeleteForm } from '@/app/ui/LocationDeleteForm';
|
||||
import { Main } from '@/app/ui/Main';
|
||||
|
||||
export default async function Page({ params:{ id } }: { params: { id:string } }) {
|
||||
|
||||
const location = await fetchLocationById(id);
|
||||
|
||||
if (!location) {
|
||||
return(notFound());
|
||||
}
|
||||
|
||||
return (
|
||||
<Main>
|
||||
<LocationDeleteForm location={location} />
|
||||
</Main>
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
import { notFound } from 'next/navigation';
|
||||
import { LocationEditForm } from '@/app/ui/LocationEditForm';
|
||||
import { fetchLocationById } from '@/app/lib/actions/locationActions';
|
||||
|
||||
export default async function LocationEditPage({ locationId }: { locationId:string }) {
|
||||
|
||||
const location = await fetchLocationById(locationId);
|
||||
|
||||
if (!location) {
|
||||
return(notFound());
|
||||
}
|
||||
|
||||
const result = <LocationEditForm location={location} />;
|
||||
|
||||
return (result);
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
import { NotFoundPage } from '@/app/ui/NotFoundPage';
|
||||
|
||||
const BillingLocationNotFound = () =>
|
||||
<NotFoundPage title="404 Location Not Found" description="Could not find the requested Location." />;
|
||||
|
||||
export default BillingLocationNotFound;
|
||||
@@ -1,15 +0,0 @@
|
||||
import { Suspense } from 'react';
|
||||
import LocationEditPage from './LocationEditPage';
|
||||
import { Main } from '@/app/ui/Main';
|
||||
import { LocationEditFormSkeleton } from '@/app/ui/LocationEditForm';
|
||||
|
||||
export default async function Page({ params:{ id } }: { params: { id:string } }) {
|
||||
|
||||
return (
|
||||
<Main>
|
||||
<Suspense fallback={<LocationEditFormSkeleton />}>
|
||||
<LocationEditPage locationId={id} />
|
||||
</Suspense>
|
||||
</Main>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user