import { lazy } from "react"; import { Redirect, Route, Switch } from "react-router-dom"; import { MWMediaType } from "@/backend/metadata/types"; import { BannerContextProvider } from "@/hooks/useBanner"; import { Layout } from "@/setup/Layout"; import { BookmarkContextProvider } from "@/state/bookmark"; import { SettingsProvider } from "@/state/settings"; import { WatchedContextProvider } from "@/state/watched"; import { MediaView } from "@/views/media/MediaView"; import { NotFoundPage } from "@/views/notfound/NotFoundView"; import { V2MigrationView } from "@/views/other/v2Migration"; import { SearchView } from "@/views/search/SearchView"; function App() { return ( {/* functional routes */} {/* pages */} {/* other */} import("@/views/developer/DeveloperView") )} /> import("@/views/developer/VideoTesterView") )} /> {/* developer routes that can abuse workers are disabled in production */} {process.env.NODE_ENV === "development" ? ( <> import("@/views/developer/TestView") )} /> import("@/views/developer/ProviderTesterView") )} /> import("@/views/developer/EmbedTesterView") )} /> ) : null} ); } export default App;