1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-20 14:37:43 +01:00

Merge pull request #38 from Kingscliq/master

refactor of if else to tenary for simplicity
This commit is contained in:
James Hawkins 2021-10-23 09:31:12 +01:00 committed by GitHub
commit 7bd4b8a665
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,14 +5,13 @@ import './index.css';
function Router() {
const { streamData } = useMovie();
if (streamData) return <MovieView />;
else return <SearchView />;
return streamData ? <MovieView /> : <SearchView />;
}
function App() {
return (
<MovieProvider>
<Router/>
<Router />
</MovieProvider>
);
}