-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
da-in
committed
Nov 25, 2023
1 parent
6e2dcf4
commit f9d9a4b
Showing
11 changed files
with
167 additions
and
13 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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,20 @@ | ||
import BandItem, {BandItemType} from "./BandItem.tsx"; | ||
|
||
interface Props { | ||
title: string | ||
band: BandItemType[] | ||
} | ||
|
||
const Band = ({title, band}: Props) => { | ||
return( | ||
<> | ||
<span className="text-3xl font-bold mb-2">{title}</span> | ||
<div className="flex flex-row gap-4 w-full overflow-x-scroll"> | ||
{band.map((item, index) => { | ||
return <BandItem key={index} title={item.title} /> | ||
})} | ||
</div> | ||
</> | ||
) | ||
} | ||
export default Band |
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,23 @@ | ||
import {Link} from "react-router-dom"; | ||
import thumbnail from "../assets/thumbnail.png"; | ||
|
||
interface Props { | ||
title: string | ||
} | ||
|
||
export interface BandItemType{ | ||
title: string | ||
} | ||
|
||
const BandItem = ({ title }:Props) => { | ||
return ( | ||
<Link to="/view" > | ||
<div className="rounded-xl w-[12rem] overflow-hidden"> | ||
<img src={thumbnail} alt="thumbnail"/> | ||
<div>{title}</div> | ||
<span>FURIPOTER</span> | ||
</div> | ||
</Link> | ||
) | ||
} | ||
export default BandItem |
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,21 @@ | ||
import {Link} from "react-router-dom"; | ||
import Band from "../components/Band.tsx"; | ||
|
||
const hot10 = [ | ||
{title: '[LIVE] FURIOSA AI 해커톤 현장'}, | ||
{title: '[단독] 퓨리포터 등장'}, | ||
{title: '[긴급] 세상에 지금이 몇시지'}, | ||
{title: '여긴 어디 나는 누구'} | ||
] | ||
|
||
const HomePage = () => { | ||
return( | ||
<div className="flex flex-col w-full h-full bg-black p-6"> | ||
<Band title='HOT 10' band={hot10}/> | ||
<br/> | ||
<br/> | ||
<Link to="/live" >영상 촬영 페이지</Link> | ||
</div> | ||
) | ||
} | ||
export default HomePage |
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,37 @@ | ||
import React, { useRef, useEffect } from 'react'; | ||
import Header from "../components/Header.tsx"; | ||
|
||
const ViewPage: React.FC = () => { | ||
|
||
const videoRef = useRef<HTMLVideoElement | null>(null); | ||
|
||
useEffect(() => { | ||
// 비디오 주소 | ||
const videoUrl = "https://furiosa-video.s3.ap-northeast-2.amazonaws.com/upload/2"; | ||
|
||
// 비디오 요소 참조 | ||
const videoElement = videoRef.current; | ||
|
||
if (videoElement) { | ||
// 비디오 주소를 설정하고 비디오 로드 | ||
videoElement.src = videoUrl; | ||
|
||
videoElement.addEventListener('loadedmetadata', () => { | ||
videoElement.play().catch(error => console.error('비디오 재생 중 오류:', error)); | ||
}); | ||
} | ||
}, []); | ||
|
||
return ( | ||
<> | ||
<video ref={videoRef} className="video" width="100%"> | ||
Your browser does not support the video tag. | ||
</video> | ||
<div className="fixed top-0 left-0 w-full"> | ||
<Header /> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export default ViewPage |
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