mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #4777 from thornbill/migrate-quick-connect
Migrate quick connect page to react
This commit is contained in:
commit
f14a61c8c7
17 changed files with 214 additions and 89 deletions
17
src/components/router/Redirect.tsx
Normal file
17
src/components/router/Redirect.tsx
Normal file
|
@ -0,0 +1,17 @@
|
|||
import React from 'react';
|
||||
import { Navigate, Route } from 'react-router-dom';
|
||||
|
||||
export interface Redirect {
|
||||
from: string
|
||||
to: string
|
||||
}
|
||||
|
||||
export function toRedirectRoute({ from, to }: Redirect) {
|
||||
return (
|
||||
<Route
|
||||
key={from}
|
||||
path={from}
|
||||
element={<Navigate replace to={to} />}
|
||||
/>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue