mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix review issues
This commit is contained in:
parent
db7f385923
commit
5b5784a448
2 changed files with 5 additions and 3 deletions
|
@ -96,7 +96,7 @@ const ConnectionRequired: FunctionComponent<ConnectionRequiredProps> = ({
|
|||
throw new Error('Public system info request failed');
|
||||
}
|
||||
const systemInfo = await infoResponse.json();
|
||||
if (!systemInfo.StartupWizardCompleted) {
|
||||
if (!systemInfo?.StartupWizardCompleted) {
|
||||
// Bounce to the wizard
|
||||
console.info('[ConnectionRequired] startup wizard is not complete, redirecting there');
|
||||
navigate(BounceRoutes.StartWizard);
|
||||
|
@ -104,6 +104,7 @@ const ConnectionRequired: FunctionComponent<ConnectionRequiredProps> = ({
|
|||
}
|
||||
} catch (ex) {
|
||||
console.error('[ConnectionRequired] checking wizard status failed', ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -112,7 +113,8 @@ const ConnectionRequired: FunctionComponent<ConnectionRequiredProps> = ({
|
|||
return;
|
||||
}
|
||||
|
||||
// TODO: should exiting the app be handled here?
|
||||
// TODO: appRouter will call appHost.exit() if navigating back when you are already at the default route.
|
||||
// This case will need to be handled elsewhere before appRouter can be killed.
|
||||
|
||||
const client = ServerConnections.currentApiClient();
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ const normalizePath = (pathname: string) => pathname.replace(/^!/, '');
|
|||
* Refs: https://github.com/remix-run/react-router/blob/v6.3.0/packages/react-router-dom/index.tsx#L222
|
||||
*/
|
||||
export function HistoryRouter({ basename, children, history }: HistoryRouterProps) {
|
||||
const [state, setState] = React.useState({
|
||||
const [state, setState] = React.useState<Update>({
|
||||
action: history.action,
|
||||
location: history.location
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue