From 78515dba66436c6804b11ab74760f436cc8c9fc4 Mon Sep 17 00:00:00 2001 From: Jean Brito Date: Thu, 22 Aug 2024 15:27:36 -0300 Subject: [PATCH] lint fix --- src/ui/components/ServersView/ErrorView.tsx | 93 ++++++++++--------- .../ServersView/UnsupportedServer.tsx | 1 - 2 files changed, 48 insertions(+), 46 deletions(-) diff --git a/src/ui/components/ServersView/ErrorView.tsx b/src/ui/components/ServersView/ErrorView.tsx index f049f1afa..8bb59793c 100644 --- a/src/ui/components/ServersView/ErrorView.tsx +++ b/src/ui/components/ServersView/ErrorView.tsx @@ -9,7 +9,6 @@ import { useState, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import { FailureImage } from '../FailureImage'; -import { ErrorPane } from './styles'; type ErrorViewProps = { isFailed: boolean; @@ -56,53 +55,57 @@ const ErrorView = ({ isFailed, onReload }: ErrorViewProps) => { }; return ( - - - - - - - {t('loadingError.announcement')} + <> + {isFailed || + (isReloading && ( + + + + + + + {t('loadingError.announcement')} - {t('loadingError.title')} - - - + {t('loadingError.title')} + + + - - {isReloading && ( - - - - )} + + {isReloading && ( + + + + )} - {!isReloading && ( - - - - )} - - - + {!isReloading && ( + + + + )} + + + + ))} + ); }; diff --git a/src/ui/components/ServersView/UnsupportedServer.tsx b/src/ui/components/ServersView/UnsupportedServer.tsx index d02189e04..f02dc61a5 100644 --- a/src/ui/components/ServersView/UnsupportedServer.tsx +++ b/src/ui/components/ServersView/UnsupportedServer.tsx @@ -11,7 +11,6 @@ import { ipcRenderer } from 'electron'; import { useTranslation } from 'react-i18next'; import * as urls from '../../../urls'; -import { ErrorPane } from './styles'; type UnsupportedServerProps = { isSupported: boolean | undefined;