mirror of
https://github.com/movie-web/movie-web.git
synced 2024-12-26 05:11:52 +01:00
20 lines
399 B
JavaScript
20 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;
|