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

update routes for multisearch

This commit is contained in:
castdrian 2023-06-30 11:43:11 +02:00
parent 2fa44b8f51
commit 7c890443e0

View file

@ -10,7 +10,6 @@ import {
import { convertLegacyUrl, isLegacyUrl } from "@/backend/metadata/getmeta"; import { convertLegacyUrl, isLegacyUrl } from "@/backend/metadata/getmeta";
import { generateQuickSearchMediaUrl } from "@/backend/metadata/tmdb"; import { generateQuickSearchMediaUrl } from "@/backend/metadata/tmdb";
import { MWMediaType } from "@/backend/metadata/types/mw";
import { BannerContextProvider } from "@/hooks/useBanner"; import { BannerContextProvider } from "@/hooks/useBanner";
import { Layout } from "@/setup/Layout"; import { Layout } from "@/setup/Layout";
import { BookmarkContextProvider } from "@/state/bookmark"; import { BookmarkContextProvider } from "@/state/bookmark";
@ -64,9 +63,6 @@ function App() {
<Switch> <Switch>
{/* functional routes */} {/* functional routes */}
<Route exact path="/v2-migration" component={V2MigrationView} /> <Route exact path="/v2-migration" component={V2MigrationView} />
<Route exact path="/">
<Redirect to={`/search/${MWMediaType.MOVIE}`} />
</Route>
<Route exact path="/s/:query"> <Route exact path="/s/:query">
<QuickSearch /> <QuickSearch />
</Route> </Route>
@ -82,11 +78,16 @@ function App() {
<MediaView /> <MediaView />
</LegacyUrlView> </LegacyUrlView>
</Route> </Route>
<Route <Route exact path="/search/:type/:query?">
exact <Redirect to="/browse/:query" />
path="/search/:type/:query?" </Route>
component={SearchView} <Route exact path="/search/:type">
/> <Redirect to="/browse" />
</Route>
<Route exact path="/browse/:query?" component={SearchView} />
<Route exact path="/">
<Redirect to="/browse" />
</Route>
{/* other */} {/* other */}
<Route <Route