Feat: 404 페이지 추가

This commit is contained in:
jhynsoo 2024-09-23 09:13:23 +09:00
parent dfa42e4a0d
commit e3e30257c8
3 changed files with 25 additions and 1 deletions

View File

@ -0,0 +1,13 @@
export default function NotFound() {
return (
<div className="flex h-full w-full flex-col items-center justify-center">
<h1 className="animate-weight-loop text-[64px] text-gray-900"> .</h1>
<button
className="body text-primary hover:underline"
onClick={() => window.history.back()}
>
</button>
</div>
);
}

View File

@ -15,6 +15,7 @@ import AdminIndex from '@/pages/AdminIndex';
import LabelCanvas from '@/pages/LabelCanvas'; import LabelCanvas from '@/pages/LabelCanvas';
import ReviewDetail from '@/components/ReviewDetail'; import ReviewDetail from '@/components/ReviewDetail';
import ImageFolderUploadTest from '@/pages/ImageFolderUploadTest'; import ImageFolderUploadTest from '@/pages/ImageFolderUploadTest';
import NotFound from '@/pages/NotFound';
export const webPath = { export const webPath = {
home: () => '/', home: () => '/',
@ -34,13 +35,17 @@ const router = createBrowserRouter([
index: true, index: true,
element: <Home />, element: <Home />,
}, },
{
path: '*',
element: <NotFound />,
},
], ],
}, },
{ {
// FIXME: index에서 오류나지 않게 수정 // FIXME: index에서 오류나지 않게 수정
path: webPath.browse(), path: webPath.browse(),
element: ( element: (
<Suspense fallback={<div></div>}> <Suspense fallback={<PageLayout />}>
<WorkspaceBrowseLayout /> <WorkspaceBrowseLayout />
</Suspense> </Suspense>
), ),

View File

@ -67,10 +67,16 @@ export default {
from: { height: 'var(--radix-accordion-content-height)' }, from: { height: 'var(--radix-accordion-content-height)' },
to: { height: '0' }, to: { height: '0' },
}, },
'weight-loop': {
'0%': { 'font-weight': '100' },
'50%': { 'font-weight': '900' },
'100%': { 'font-weight': '100' },
},
}, },
animation: { animation: {
'accordion-down': 'accordion-down 0.2s ease-out', 'accordion-down': 'accordion-down 0.2s ease-out',
'accordion-up': 'accordion-up 0.2s ease-out', 'accordion-up': 'accordion-up 0.2s ease-out',
'weight-loop': 'weight-loop 5s infinite',
}, },
}, },
}, },