Skip to content

Commit eb01aaf

Browse files
committed
Refactored page routes to use named function exports with descriptive names
1 parent f91642e commit eb01aaf

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed

app/(main)/(routes)/documents/[documentId]/page.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type Props = {
1515
};
1616
};
1717

18-
const Page = ({ params: { documentId } }: Props) => {
18+
export default function Document({ params: { documentId } }: Props) {
1919
const Editor = useMemo(
2020
() =>
2121
dynamic(() => import("@/components/shared/Editor"), {
@@ -65,6 +65,4 @@ const Page = ({ params: { documentId } }: Props) => {
6565
</div>
6666
</div>
6767
);
68-
};
69-
70-
export default Page;
68+
}

app/(main)/(routes)/documents/page.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { api } from "@/convex/_generated/api";
1010
import { toast } from "sonner";
1111
import { useRouter } from "next/navigation";
1212

13-
const Page = () => {
13+
export default function Documents() {
1414
const router = useRouter();
1515
const { user } = useUser();
1616
const create = useMutation(api.documents.create);
@@ -51,6 +51,4 @@ const Page = () => {
5151
</Button>
5252
</div>
5353
);
54-
};
55-
56-
export default Page;
54+
}

app/(marketing)/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Footer } from "./_components/Footer";
22
import { Heading } from "./_components/Heading";
33
import { Heroes } from "./_components/Heroes";
44

5-
export default function Home() {
5+
export default function Marketing() {
66
return (
77
<div className="flex min-h-full flex-col dark:bg-[#1F1F1F]">
88
<div className="flex flex-1 flex-col items-center justify-center gap-y-8 px-6 pb-10 text-center md:justify-start">

app/(public)/(routes)/preview/[documentId]/page.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type Props = {
1515
};
1616
};
1717

18-
const Page = ({ params: { documentId } }: Props) => {
18+
export default function Preview({ params: { documentId } }: Props) {
1919
const Editor = useMemo(
2020
() =>
2121
dynamic(() => import("@/components/shared/Editor"), {
@@ -69,6 +69,4 @@ const Page = ({ params: { documentId } }: Props) => {
6969
</div>
7070
</div>
7171
);
72-
};
73-
74-
export default Page;
72+
}

0 commit comments

Comments
 (0)