Skip to content

Commit a2cdeeb

Browse files
committed
redirect user to datasets page
1 parent b054799 commit a2cdeeb

File tree

1 file changed

+18
-9
lines changed
  • app/[locale]/dashboard/[entityType]/[entitySlug]

1 file changed

+18
-9
lines changed
Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1-
import { InProgress } from '@/components/in-progress';
2-
3-
export default async function Page({ params }: { params: { id: string } }) {
4-
return (
5-
<>
6-
<InProgress />
7-
</>
8-
);
9-
}
1+
'use client';
2+
3+
import { useEffect } from 'react';
4+
import { useRouter } from 'next/navigation';
5+
6+
export default function Page({
7+
params,
8+
}: {
9+
params: { entityType: string; entitySlug: string };
10+
}) {
11+
const router = useRouter();
12+
13+
useEffect(() => {
14+
router.push(`/dashboard/${params.entityType}/${params.entitySlug}/dataset?tab=drafts`);
15+
}, [params, router]);
16+
17+
return null; // prevent rendering anything before redirect
18+
}

0 commit comments

Comments
 (0)