Skip to content

Commit

Permalink
Fix Known Error
Browse files Browse the repository at this point in the history
  • Loading branch information
Osadhi committed Nov 29, 2024
1 parent 9f548f3 commit bc83d1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions app/(main)/(routes)/documents/[documentId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ import { Toolbar } from "@/components/toolbar";
import { Cover } from "@/components/cover";
import { useMemo } from "react";
import dynamic from "next/dynamic";
import { useRouter } from "next/router";
import { useParams } from "next/navigation";


export default function DocumentIdPage() {
const router = useRouter();
const documentId = router.query.documentId;
const {documentId} = useParams ();
const Editor = useMemo(
() => dynamic(() => import("@/components/editor"), { ssr: false }),
[]
Expand Down
5 changes: 2 additions & 3 deletions app/(public)/(routes)/preview/[documentId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ import { api } from "@/convex/_generated/api";
import { Toolbar } from "@/components/toolbar";
import { Cover } from "@/components/cover";
import { Skeleton } from "@/components/ui/skeleton";
import {useRouter} from "next/router";
import {useParams } from "next/navigation";


export default function DocumentIdPage() {
const router = useRouter();
const documentId = router.query.documentId;
const {documentId} = useParams ();
const Editor = useMemo(
() => dynamic(() => import("@/components/editor"), { ssr: false }),
[],
Expand Down

0 comments on commit bc83d1f

Please sign in to comment.