-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrated svg-components to App-router (#68394)
Hello! This PR Contains the Following Changes => svg-components Example Migrated to App-Router => Added the layout.tsx file as part of the App Router. => Folder Structure Updated to support APP-Router convention => File Convention updated to Support the APP-Router convention => Npm package got updated "@svgr/webpack": "^6.2.1", to "@svgr/webpack": "^6.5.1", CC- @samcx --------- Co-authored-by: Sam Ko <sam@vercel.com>
- Loading branch information
1 parent
93824b9
commit 599f3a0
Showing
4 changed files
with
31 additions
and
8 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,16 @@ | ||
export const metadata = { | ||
title: "Next.js", | ||
description: "Generated by Next.js", | ||
}; | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
return ( | ||
<html lang="en"> | ||
<body>{children}</body> | ||
</html> | ||
); | ||
} |
2 changes: 2 additions & 0 deletions
2
examples/svg-components/pages/index.tsx → examples/svg-components/app/page.tsx
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
"use client"; | ||
|
||
import Cat from "&/svgs/cat.svg"; | ||
import styles from "&/styles/index.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