Skip to content

Commit 56eebfc

Browse files
committed
fixed useSearchParams() needs to be wrapped in Suspense
1 parent 234a303 commit 56eebfc

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src-next/app/files/page.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
"use client";
22

3-
import React from "react";
3+
import React, { Suspense } from "react";
44
import useCurrentPath from "@/hooks/useCurrentPath.ts";
55
import FileExplorer from "@/components/file-explorer/FileExplorer.tsx";
66

77
export default function Page(): React.ReactElement {
88
const { path } = useCurrentPath();
99

1010
return (
11-
<div>
12-
<FileExplorer path={path} />
13-
</div>
11+
<Suspense fallback={<div>Loading...</div>}>
12+
<div>
13+
<FileExplorer path={path} />
14+
</div>
15+
</Suspense>
1416
);
1517
}

0 commit comments

Comments
 (0)