diff --git a/.changeset/wicked-chicken-attack.md b/.changeset/wicked-chicken-attack.md new file mode 100644 index 00000000..5d1b580d --- /dev/null +++ b/.changeset/wicked-chicken-attack.md @@ -0,0 +1,5 @@ +--- +"@premieroctet/next-admin": minor +--- + +feat: redirect to first resource if dashboard doesnt exist diff --git a/packages/next-admin/src/components/Dashboard.tsx b/packages/next-admin/src/components/Dashboard.tsx index 21e07243..e416bc63 100644 --- a/packages/next-admin/src/components/Dashboard.tsx +++ b/packages/next-admin/src/components/Dashboard.tsx @@ -1,7 +1,21 @@ -export type DashboardProps = {}; +"use client"; +import { useConfig } from "../context/ConfigContext"; +import { useRouterInternal } from "../hooks/useRouterInternal"; +import { ModelName } from "../types"; -const Dashboard = ({}: DashboardProps) => { - return