REFACTOR(repo): simplify project structure
- Move services/nextjs/ to nextjs/ - Move Dockerfile.prod to Dockerfile at root - Remove deploy/ folder (K8s manifests moved to K3S-HOME/web-apps) - Remove .gitea/ workflows - Update GitHub Actions for new structure - Remove develop branch triggers
This commit is contained in:
25
nextjs/components/movie-videos.tsx
Normal file
25
nextjs/components/movie-videos.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import styles from "../styles/movie-videos.module.css";
|
||||
|
||||
const URL = "https://nomad-movies.nomadcoders.workers.dev/movies";
|
||||
|
||||
async function getVideos(id: string) {
|
||||
const response = await fetch(`${URL}/${id}/videos`);
|
||||
return response.json();
|
||||
}
|
||||
|
||||
export default async function VideosInfo({ id }: { id: string }) {
|
||||
const videos = await getVideos(id);
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
{videos.map((video: any) => (
|
||||
<iframe
|
||||
key={video.id}
|
||||
src={`https://youtube.com/embed/${video.key}`}
|
||||
title={video.name}
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowFullScreen
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user