implementiran share by link

This commit is contained in:
2024-12-13 17:50:12 +01:00
parent 439de9d305
commit 4ab61f9917
15 changed files with 312 additions and 15 deletions

View File

@@ -0,0 +1,13 @@
import { ViewLocationCard } from '@/app/ui/ViewLocationCard';
import { fetchLocationById } from '@/app/lib/actions/locationActions';
import { notFound } from 'next/navigation';
export default async function LocationViewPage({ locationId }: { locationId:string }) {
const location = await fetchLocationById(locationId);
if (!location) {
return(notFound());
}
return (<ViewLocationCard location={location} />);
}

View File

@@ -0,0 +1,15 @@
import { Suspense } from 'react';
import LocationViewPage from './LocationViewPage';
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 />}>
<LocationViewPage locationId={id} />
</Suspense>
</Main>
);
}