File size: 560 Bytes
f5071ca |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import { useContext } from "react"
import Display from "./components/Display"
import Player from "./components/Player"
import Sidebar from "./components/Sidebar"
import { PlayerContext } from "./context/PlayerContext"
const App = () => {
const {audioRef,track} = useContext(PlayerContext)
return (
<div className="h-screen bg-black">
<div className="h-[90%] flex">
<Sidebar/>
<Display/>
</div>
<Player/>
<audio ref={audioRef} src={track.file} preload="auto">
</audio>
</div>
)
}
export default App |