1
0
Fork 0
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:
Bill Thornton 2022-04-22 14:27:28 -04:00
parent b2372a96e2
commit 1aeb90d323
2 changed files with 171 additions and 1 deletions

View file

@ -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>