-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate from Next.js Pages Router to App Router #255
Changes from 30 commits
cc425f0
7f6cd30
d391826
42c8b02
ccecc89
825292a
4c9de34
1fadabd
d6de227
e4ac258
fff60ce
b82e14d
022740f
447a4c5
739900c
9e20c82
d79bb65
6af1c77
79ca32b
c611f43
6e759ea
2672191
6fd126a
b4c4c21
02e2d93
2acda08
43e9695
02b0546
3bebef7
1bbc39e
c2a1c3f
6c42256
06cd838
bd0c2de
2d73ff6
ac211f2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
/// <reference types="next/navigation-types/compat/navigation" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function Page() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is the /health/ page an aspect of next.js that's built in to handle some particular functionality? I couldn't find it looking in the docs. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My understanding is it's required by the infra template in order to know if the container is healthy, otherwise it spins up a new ECS task. |
||
return <>healthy</>; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* Root layout component, wraps all pages. | ||
* @see https://nextjs.org/docs/app/api-reference/file-conventions/layout | ||
*/ | ||
import { Metadata } from "next"; | ||
|
||
import Layout from "src/components/Layout"; | ||
|
||
import "src/styles/styles.scss"; | ||
|
||
export const metadata: Metadata = { | ||
icons: [`${process.env.NEXT_PUBLIC_BASE_PATH ?? ""}/img/logo.svg`], | ||
}; | ||
|
||
interface LayoutProps { | ||
children: React.ReactNode; | ||
params: { | ||
locale: string; | ||
}; | ||
} | ||
|
||
export default function RootLayout({ children, params }: LayoutProps) { | ||
return ( | ||
<html lang={params.locale}> | ||
<body> | ||
{/* Separate layout component for the inner-body UI elements since Storybook | ||
and tests trip over the fact that this file renders an <html> tag */} | ||
<Layout locale={params.locale}>{children}</Layout> | ||
</body> | ||
</html> | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ Automatically added by Next.js when using App Router