1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-30 16:17:41 +01:00
smov/src/App.js

21 lines
414 B
JavaScript
Raw Normal View History

2021-07-14 00:31:37 +02:00
import { SearchView } from './views/Search';
import { MovieView } from './views/Movie';
2021-08-07 20:42:56 +02:00
import { useMovie, MovieProvider } from './hooks/useMovie';
import './index.css';
2021-07-14 00:31:37 +02:00
function Router() {
2021-08-02 14:15:18 +02:00
const { streamData } = useMovie();
if (streamData) return <MovieView />;
else return <SearchView />;
2021-07-14 00:31:37 +02:00
}
function App() {
return (
<MovieProvider>
<Router/>
</MovieProvider>
);
}
export default App;