1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2025-01-21 02:31:24 +01:00
smov/src/App.tsx

25 lines
796 B
TypeScript
Raw Normal View History

import { MWMediaType } from "providers";
import { Redirect, Route, Switch } from "react-router-dom";
import { WatchedContextProvider } from "state/watched/context";
import "./index.css";
import { MovieView } from "./views/MovieView";
import { SearchView } from "./views/SearchView";
import { SeriesView } from "./views/SeriesView";
2022-02-06 20:56:48 +01:00
function App() {
return (
<WatchedContextProvider>
<Switch>
<Route exact path="/">
<Redirect to={`/${MWMediaType.MOVIE}`} />
</Route>
<Route exact path="/media/movie/:media" component={MovieView} />
<Route exact path="/media/series/:media" component={SeriesView} />
<Route exact path="/:type/:query?" component={SearchView} />
</Switch>
</WatchedContextProvider>
2022-02-06 20:56:48 +01:00
);
}
export default App;