mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-01-09 01:37:24 +03:00
Remove unnecessary double type check
This commit is contained in:
parent
adb50a91e7
commit
d154820b28
1 changed files with 2 additions and 3 deletions
|
@ -29,13 +29,12 @@ ShlinkWebComponentContainerDeps
|
||||||
ShlinkWebComponent,
|
ShlinkWebComponent,
|
||||||
ServerError,
|
ServerError,
|
||||||
} = useDependencies(ShlinkWebComponentContainer);
|
} = useDependencies(ShlinkWebComponentContainer);
|
||||||
const selectedServerIsReachable = isReachableServer(selectedServer);
|
|
||||||
const routesPrefix = selectedServerIsReachable ? `/server/${selectedServer.id}` : '';
|
|
||||||
|
|
||||||
if (!selectedServerIsReachable) {
|
if (!isReachableServer(selectedServer)) {
|
||||||
return <ServerError />;
|
return <ServerError />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const routesPrefix = `/server/${selectedServer.id}`;
|
||||||
return (
|
return (
|
||||||
<ShlinkWebComponent
|
<ShlinkWebComponent
|
||||||
serverVersion={selectedServer.version}
|
serverVersion={selectedServer.version}
|
||||||
|
|
Loading…
Reference in a new issue