codenuk_frontend_mine/src/app/github/repo/page.tsx
2025-09-29 14:34:15 +05:30

18 lines
648 B
TypeScript

import RepoByIdClient from "./repo-client"
export default function Page({ searchParams }: { searchParams?: { id?: string; path?: string } }) {
const id = (searchParams?.id as string) || ""
const path = (searchParams?.path as string) || ""
if (!id) {
return (
<div className="mx-auto max-w-3xl px-4 py-10 text-white/80">
<h1 className="text-2xl font-semibold">Repository</h1>
<p className="mt-2">Missing repository id. Go back to <a href="/github/repos" className="text-orange-400 underline">My GitHub Repositories</a>.</p>
</div>
)
}
return <RepoByIdClient repositoryId={id} initialPath={path} />
}