You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
399 B
19 lines
399 B
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;
|
|
|