1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

fix admin route

This commit is contained in:
grafixeyehero 2022-06-29 21:06:42 +03:00
parent 6fb884a212
commit b1a50fbd73
2 changed files with 18 additions and 69 deletions

View file

@ -1,5 +1,5 @@
import React, { FunctionComponent, useEffect, useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { Outlet, useNavigate } from 'react-router-dom';
import alert from './alert';
import { appRouter } from './appRouter';
@ -33,7 +33,6 @@ type ConnectionRequiredProps = {
* If a condition fails, this component will navigate to the appropriate page.
*/
const ConnectionRequired: FunctionComponent<ConnectionRequiredProps> = ({
children,
isAdminRequired = false,
isUserRequired = true
}) => {
@ -161,9 +160,7 @@ const ConnectionRequired: FunctionComponent<ConnectionRequiredProps> = ({
return null;
}
return (
<>{children}</>
);
return <Outlet />;
};
export default ConnectionRequired;