feat: support mobile video previews

This commit is contained in:
TerryM
2026-06-01 16:35:40 +08:00
parent c53032155b
commit a968f47640
16 changed files with 275 additions and 47 deletions

View File

@@ -35,19 +35,11 @@ export default function App() {
<ScrollToTop />
<Routes>
<Route element={<PublicLayout />}>
{/* English (root, no prefix) */}
<Route
path="/"
element={<LocalizedHomePage targetLang="en" />}
/>
{localizedHomeRoutes.map((route) => (
<Route
key={route.path}
path={route.path}
element={
<LocalizedHomePage targetLang={route.lang} />
}
/>
))}
<Route path="/browse" element={<Browse />} />
<Route
path="/categories"
@@ -67,6 +59,37 @@ export default function App() {
element={<PostRedirect />}
/>
<Route path="/favorites" element={<Favorites />} />
{/* Each non-English language gets its own nested tree. */}
{localizedHomeRoutes.map((route) => (
<Route key={route.path} path={route.path}>
<Route
index
element={
<LocalizedHomePage targetLang={route.lang} />
}
/>
<Route path="browse" element={<Browse />} />
<Route
path="categories"
element={<CategoriesPage />}
/>
<Route
path="official-recommendations"
element={<OfficialRecommendationsPage />}
/>
<Route
path="category/:slug"
element={<CategoryPage />}
/>
<Route path="search" element={<SearchPage />} />
<Route
path="resource/:id"
element={<PostRedirect />}
/>
<Route path="favorites" element={<Favorites />} />
</Route>
))}
</Route>
{adminEnabled ? (