-
Notifications
You must be signed in to change notification settings - Fork 27.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated the example of with-videojs to utilize the App Router (#70226)
This PR updates the with-videojs example to use the App Router. Here are the changes that have been made: - Renamed the pages folder to the app folder. - Updated the routing for / files to align with the App Router. - Added the layout.tsx file as part of the App Router. - Updated the package.json file. The following actions were performed as part of this PR: - Ran `pnpm prettier-check `with no issues found. - Executed the `pnpm check-examples` script. CC: @samcx --------- Co-authored-by: samcx <sam@vercel.com>
- Loading branch information
1 parent
6d46b17
commit cc8b809
Showing
8 changed files
with
48 additions
and
22 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
examples/with-videojs/components/Player.tsx → ...s/with-videojs/app/_components/Player.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
File renamed without changes.
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,18 @@ | ||
import "video.js/dist/video-js.css"; | ||
|
||
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> | ||
); | ||
} |
7 changes: 4 additions & 3 deletions
7
examples/with-videojs/pages/index.tsx → examples/with-videojs/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
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 |
---|---|---|
@@ -1,22 +1,22 @@ | ||
{ | ||
"private": true, | ||
"scripts": { | ||
"dev": "next", | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start" | ||
}, | ||
"dependencies": { | ||
"next": "latest", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"video.js": "^7.20.3", | ||
"videojs-youtube": "^2.6.1" | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"video.js": "^8.17.4", | ||
"videojs-youtube": "^3.0.1" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^18.11.9", | ||
"@types/react": "^18.0.25", | ||
"@types/react-dom": "^18.0.9", | ||
"@types/video.js": "^7.3.49", | ||
"typescript": "^4.9.3" | ||
"@types/node": "^22.5.5", | ||
"@types/react": "^18.3.7", | ||
"@types/react-dom": "^18.3.0", | ||
"@types/video.js": "^7.3.58", | ||
"typescript": "^5.6.2" | ||
} | ||
} |
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