Skip to content

Commit

Permalink
fix datagraph new child page
Browse files Browse the repository at this point in the history
  • Loading branch information
Southclaws committed Jun 21, 2024
1 parent 8153325 commit 66d811c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions web/src/app/(dashboard)/directory/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ export default async function Page(props: Props) {
const [targetSlug, isNew] = getTargetSlug(slug);

if (targetSlug) {
if (isNew) {
if (!session) {
redirect(`/login`); // TODO: ?return= back to this path.
}

return <NodeCreateScreen session={session} />;
}

const node = await server<NodeGetOKResponse>({
url: `/v1/nodes/${targetSlug}`,
});
Expand Down

0 comments on commit 66d811c

Please sign in to comment.