Skip to content

Commit 6392d93

Browse files
committed
feat: remove unnecessary page nextjs prop types
its built in now
1 parent 073e5ae commit 6392d93

File tree

3 files changed

+2
-39
lines changed

3 files changed

+2
-39
lines changed

apps/web/src/app/(authed)/layout.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { redirect } from 'next/navigation'
22

3-
import type { DynamicLayoutProps } from '~/types/nextjs'
43
import { getSession } from '~/server/session'
54
import { VersionCheckWrapper } from '../_components/version-check-wrapper'
65

7-
export default async function AuthedLayout({ children }: DynamicLayoutProps) {
6+
export default async function AuthedLayout({ children }: LayoutProps<'/'>) {
87
// DO NOT SKIP AUTHENTICATION CHECKS IN YOUR PROCEDURES.
98
// It is NOT secure. You can access a page data bypassing a layout call. It’s not trivial but it can be done.
109
// Always put your auth call as close to the actual data call as possible, ideally right before access.

apps/web/src/app/(public)/layout.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { GovtBanner } from '@opengovsg/oui/govt-banner'
22

3-
import type { DynamicLayoutProps } from '~/types/nextjs'
43
import { VersionCheckWrapper } from '../_components/version-check-wrapper'
54

6-
export default function PublicLayout({ children }: DynamicLayoutProps) {
5+
export default function PublicLayout({ children }: LayoutProps<'/'>) {
76
return (
87
<main className="flex min-h-dvh flex-col">
98
<GovtBanner />

apps/web/src/types/nextjs.ts

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)