mirror of
https://github.com/p-stream/p-stream.git
synced 2026-03-11 17:55:33 +00:00
19 lines
399 B
JavaScript
19 lines
399 B
JavaScript
import { SearchView } from './views/Search';
|
|
import { MovieView } from './views/Movie';
|
|
import { useMovie, MovieProvider } from './hooks/useMovie';
|
|
import './index.css';
|
|
|
|
function Router() {
|
|
const { streamData } = useMovie();
|
|
return streamData ? <MovieView /> : <SearchView />;
|
|
}
|
|
|
|
function App() {
|
|
return (
|
|
<MovieProvider>
|
|
<Router />
|
|
</MovieProvider>
|
|
);
|
|
}
|
|
|
|
export default App;
|