refactor of if else to tenary for simplicity

This commit is contained in:
ajaezokingsley 2021-10-22 14:30:54 -07:00
parent 6465bdc7ef
commit ad9e125e24

View File

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