Skip to content

Commit 8817ee1

Browse files
committed
refactor: use LayoutProps as type
1 parent 80eb061 commit 8817ee1

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

src/app/[locale]/(withContainer)/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Container } from '@mui/material'
33
/**
44
* this layout places its content inside a container with maxWidth and padding
55
*/
6-
const ContainerLayout = ({ children }: { children: React.ReactNode }) => {
6+
const ContainerLayout = ({ children }: LayoutProps<'/[locale]'>) => {
77
return (
88
<Container
99
maxWidth='sm'

src/app/[locale]/(withFullWidthAndHeight)/layout.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ import { Box } from '@mui/material'
33
/**
44
* this layout places its content inside a box which uses all available width and height
55
*/
6-
const FullWidthAndHeightLayout = ({
7-
children,
8-
}: {
9-
children: React.ReactNode
10-
}) => {
6+
const FullWidthAndHeightLayout = ({ children }: LayoutProps<'/[locale]'>) => {
117
return (
128
<Box
139
// 48px is the height of the AppBar (with dense prop)

src/app/[locale]/layout.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ export const viewport: Viewport = {
3131
export default async function LocaleLayout({
3232
children,
3333
params,
34-
}: Readonly<{
35-
children: React.ReactNode
36-
params: Promise<{ locale: string }>
37-
}>) {
34+
}: LayoutProps<'/[locale]'>) {
3835
// Ensure that the incoming `locale` is valid
3936
const { locale } = await params
4037
if (!hasLocale(routing.locales, locale)) {

0 commit comments

Comments
 (0)