-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade template to Next.js 14 (#2290)
- Loading branch information
1 parent
960ad6c
commit 7a2c36d
Showing
19 changed files
with
204 additions
and
530 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sumup/cna-template': major | ||
--- | ||
|
||
Upgraded to Next.js 14 and migrated to the `/app` folder. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import type { Metadata, Viewport } from 'next'; | ||
|
||
import '@sumup/design-tokens/light.css'; | ||
import '@sumup/circuit-ui/styles.css'; | ||
|
||
import { PreloadResources } from './preload-resources'; | ||
|
||
export const metadata: Metadata = { | ||
title: { | ||
template: '%s | SumUp', | ||
default: 'SumUp', | ||
}, | ||
icons: { | ||
icon: 'https://static.sumup.com/favicons/favicon-32x32.png', | ||
shortcut: 'https://static.sumup.com/favicons/favicon.ico', | ||
apple: 'https://static.sumup.com/favicons/apple-touch-icon.png', | ||
}, | ||
manifest: 'https://static.sumup.com/favicons/site.webmanifest', | ||
}; | ||
|
||
export const viewport: Viewport = { | ||
width: 'device-width', | ||
initialScale: 1, | ||
viewportFit: 'cover', | ||
themeColor: [ | ||
{ media: '(prefers-color-scheme: light)', color: '#fff' }, | ||
{ media: '(prefers-color-scheme: dark)', color: '#000' }, | ||
], | ||
}; | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
return ( | ||
<html lang="en"> | ||
<PreloadResources /> | ||
<body>{children}</body> | ||
</html> | ||
); | ||
} |
28 changes: 28 additions & 0 deletions
28
...-template/template/pages/index.module.css → ...cna-template/template/app/page.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use client'; | ||
|
||
import ReactDOM from 'react-dom'; | ||
|
||
export function PreloadResources() { | ||
ReactDOM.preload( | ||
'https://static.sumup.com/fonts/latin-greek-cyrillic/aktiv-grotest-400.woff2', | ||
{ as: 'font' }, | ||
); | ||
ReactDOM.preload( | ||
'https://static.sumup.com/fonts/latin-greek-cyrillic/aktiv-grotest-700.woff2', | ||
{ as: 'font' }, | ||
); | ||
|
||
return null; | ||
} |
144 changes: 0 additions & 144 deletions
144
packages/cna-template/template/components/Meta/Meta.spec.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
7a2c36d
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.
Successfully deployed to the following URLs:
oss-circuit-ui – ./
oss-circuit-ui.sumup-vercel.app
circuit-ui.vercel.app
oss-circuit-ui-git-main.sumup-vercel.app
circuit.sumup.com