Skip to content

Commit

Permalink
fix(create-next-app): add missing metadata type (#52299)
Browse files Browse the repository at this point in the history
This pull request adds the missing `Metadata` type declaration to the
root layout of the `create-next-app` templates. The metadata object was
missing its type definition, which has been resolved by adding the
appropriate type import and annotation.

---------
  • Loading branch information
yigithanyucedag authored Jul 6, 2023
1 parent a17f07a commit ce483fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/create-next-app/templates/app-tw/ts/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import './globals.css'
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'

const inter = Inter({ subsets: ['latin'] })

export const metadata = {
export const metadata: Metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
}
Expand Down
3 changes: 2 additions & 1 deletion packages/create-next-app/templates/app/ts/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import './globals.css'
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'

const inter = Inter({ subsets: ['latin'] })

export const metadata = {
export const metadata: Metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
}
Expand Down

0 comments on commit ce483fd

Please sign in to comment.