mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add authentication/connection checks for react-router routes
This commit is contained in:
parent
b2372a96e2
commit
1aeb90d323
2 changed files with 171 additions and 1 deletions
|
@ -1,12 +1,20 @@
|
|||
import React from 'react';
|
||||
import { Route, Routes } from 'react-router-dom';
|
||||
|
||||
import ConnectedRoute from '../components/ConnectedRoute';
|
||||
import SearchPage from './search';
|
||||
|
||||
const AppRoutes = () => (
|
||||
<Routes>
|
||||
<Route path='/'>
|
||||
<Route path='search.html' element={<SearchPage />} />
|
||||
<Route
|
||||
path='search.html'
|
||||
element={
|
||||
<ConnectedRoute>
|
||||
<SearchPage />
|
||||
</ConnectedRoute>
|
||||
}
|
||||
/>
|
||||
{/* Suppress warnings for unhandled routes */}
|
||||
<Route path='*' element={null} />
|
||||
</Route>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue