Skip to content

Commit 031e0ea

Browse files
committed
cleanup
1 parent 2e4203d commit 031e0ea

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

apps/web/app/(org)/dashboard/folder/[id]/components/BreadcrumbItem.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interface BreadcrumbItemProps {
1515
id: Folder.FolderId;
1616
name: string;
1717
color: "normal" | "blue" | "red" | "yellow";
18-
spaceId: Space.SpaceIdOrOrganisationId;
18+
spaceId?: Space.SpaceIdOrOrganisationId | null;
1919
isLast: boolean;
2020
}
2121

@@ -64,7 +64,7 @@ export function BreadcrumbItem({
6464
await moveVideoToFolder({
6565
videoId: capData.id,
6666
folderId: id,
67-
spaceId,
67+
spaceId: spaceId ?? null,
6868
});
6969
router.refresh();
7070
toast.success(`"${capData.name}" moved to "${name}" folder`);

apps/web/app/(org)/dashboard/folder/[id]/page.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { getCurrentUser } from "@cap/database/auth/session";
22
import { serverEnv } from "@cap/env";
3-
import { CurrentUser, type Folder, type Space } from "@cap/web-domain";
3+
import { CurrentUser, type Folder } from "@cap/web-domain";
44
import { Effect } from "effect";
55
import { notFound } from "next/navigation";
66
import {
@@ -18,11 +18,7 @@ import {
1818
} from "./components";
1919
import FolderVideosSection from "./components/FolderVideosSection";
2020

21-
const FolderPage = async ({
22-
params,
23-
}: {
24-
params: { id: Folder.FolderId; spaceId: Space.SpaceIdOrOrganisationId };
25-
}) => {
21+
const FolderPage = async ({ params }: { params: { id: Folder.FolderId } }) => {
2622
const user = await getCurrentUser();
2723
if (!user || !user.activeOrganizationId) return notFound();
2824

@@ -50,7 +46,6 @@ const FolderPage = async ({
5046
<p className="mx-2 text-gray-10">/</p>
5147
<BreadcrumbItem
5248
id={folder.id}
53-
spaceId={params.spaceId}
5449
name={folder.name}
5550
color={folder.color}
5651
isLast={index === breadcrumb.length - 1}

0 commit comments

Comments
 (0)