Skip to content

Commit 6641fb3

Browse files
committed
refactor: replace type Props with interface Props
1 parent af2f697 commit 6641fb3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+278
-273
lines changed

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"cwd": "${workspaceFolder}${pathSeparator}apps${pathSeparator}app",
1717
"runtimeExecutable": "npm",
1818
"runtimeArgs": ["run", "dev"],
19-
"runtimeVersion": "22.11.0",
19+
"runtimeVersion": "22.14.0",
2020
"skipFiles": ["<node_internals>/**"],
2121
"console": "integratedTerminal",
2222
"preLaunchTask": "npm run build"

.vscode/snippets.code-snippets

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"body": [
66
"import clsx from \"clsx\";",
77
"",
8-
"type Props = Readonly<{",
9-
"\tclassName?: string;",
10-
"}>",
8+
"interface Props {",
9+
"\treadonly className?: string;",
10+
"}",
1111
"",
1212
"export const $TM_FILENAME_BASE = ({ className }: Props) => {",
1313
"\treturn (",
@@ -16,9 +16,9 @@
1616
"\t\t</div>",
1717
"\t);",
1818
"};",
19-
""
19+
"",
2020
],
2121
"description": "Boilerplate of a React component",
22-
"isFileTemplate": true
23-
}
22+
"isFileTemplate": true,
23+
},
2424
}

apps/app/src/app/admin/account/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ export const metadata: Metadata = {
1616
title: "Account | Next.js Template",
1717
};
1818

19-
type Props = Readonly<{
20-
searchParams: NextjsSearchParams;
21-
}>;
19+
interface Props {
20+
readonly searchParams: NextjsSearchParams;
21+
}
2222

2323
export default async function Page({ searchParams }: Props) {
2424
const authentication = await authenticatePage("/admin/account");

apps/app/src/app/admin/layout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import { ToasterWrapper } from "@/common/components/ToasterWrapper";
55
import { Navigation } from "@/common/components/navigation";
66
import { type ReactNode } from "react";
77

8-
type Props = Readonly<{
9-
children?: ReactNode;
10-
}>;
8+
interface Props {
9+
readonly children?: ReactNode;
10+
}
1111

1212
export default async function Layout({ children }: Props) {
1313
await authenticatePage("/admin");

apps/app/src/app/admin/teams/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ export const metadata: Metadata = {
1515
title: "Teams | Next.js Template",
1616
};
1717

18-
type Props = Readonly<{
19-
searchParams: NextjsSearchParams;
20-
}>;
18+
interface Props {
19+
readonly searchParams: NextjsSearchParams;
20+
}
2121

2222
export default async function Page({ searchParams }: Props) {
2323
const authentication = await authenticatePage("/admin/teams");

apps/app/src/app/admin/teams/team/[teamId]/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ export async function generateMetadata({
4949
}
5050
}
5151

52-
type Props = Readonly<{
53-
params: Params;
54-
}>;
52+
interface Props {
53+
readonly params: Params;
54+
}
5555

5656
export default async function Page({ params }: Props) {
5757
const { teamId } = await params;

apps/app/src/app/admin/users/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ export const metadata: Metadata = {
1515
title: "Users | Next.js Template",
1616
};
1717

18-
type Props = Readonly<{
19-
searchParams: NextjsSearchParams;
20-
}>;
18+
interface Props {
19+
readonly searchParams: NextjsSearchParams;
20+
}
2121

2222
export default async function Page({ searchParams }: Props) {
2323
const authentication = await authenticatePage("/admin/users");

apps/app/src/app/admin/users/user/[id]/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ export async function generateMetadata({
4848
}
4949
}
5050

51-
type Props = Readonly<{
52-
params: Params;
53-
}>;
51+
interface Props {
52+
readonly params: Params;
53+
}
5454

5555
export default async function Page({ params }: Props) {
5656
const authentication = await authenticatePage("/admin/users/user/[id]");

apps/app/src/app/layout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ export const metadata: Metadata = {
99
title: "Next.js Template",
1010
};
1111

12-
type Props = Readonly<{
13-
children: ReactNode;
14-
}>;
12+
interface Props {
13+
readonly children: ReactNode;
14+
}
1515

1616
export default function RootLayout({ children }: Props) {
1717
return (

apps/app/src/app/login/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ export const metadata: Metadata = {
2727
title: "Login | Next.js Template",
2828
};
2929

30-
type Props = Readonly<{
31-
searchParams: NextjsSearchParams;
32-
}>;
30+
interface Props {
31+
readonly searchParams: NextjsSearchParams;
32+
}
3333

3434
export default async function Page({ searchParams }: Props) {
3535
const authentication = await authenticate();

0 commit comments

Comments
 (0)