mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-22 17:10:26 +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,
|
||||
ServerError,
|
||||
} = useDependencies(ShlinkWebComponentContainer);
|
||||
const selectedServerIsReachable = isReachableServer(selectedServer);
|
||||
const routesPrefix = selectedServerIsReachable ? `/server/${selectedServer.id}` : '';
|
||||
|
||||
if (!selectedServerIsReachable) {
|
||||
if (!isReachableServer(selectedServer)) {
|
||||
return <ServerError />;
|
||||
}
|
||||
|
||||
const routesPrefix = `/server/${selectedServer.id}`;
|
||||
return (
|
||||
<ShlinkWebComponent
|
||||
serverVersion={selectedServer.version}
|
||||
|
|
Loading…
Reference in a new issue