Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanfbrito committed Aug 22, 2024
1 parent 1943140 commit 78515db
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 46 deletions.
93 changes: 48 additions & 45 deletions src/ui/components/ServersView/ErrorView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -56,53 +55,57 @@ const ErrorView = ({ isFailed, onReload }: ErrorViewProps) => {
};

return (
<ErrorPane isVisible={isFailed || isReloading}>
<FailureImage
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100vw',
height: '100vh',
zIndex: 0,
}}
/>
<Box
is='section'
color='pure-white'
display='flex'
flexDirection='column'
justifyContent='center'
alignItems='center'
zIndex={1}
>
<Margins block='x12'>
<Box display='flex' flexDirection='column'>
<Margins block='x8' inline='auto'>
<Box fontScale='h1'>{t('loadingError.announcement')}</Box>
<>
{isFailed ||
(isReloading && (
<Box
display='flex'
flexDirection='column'
width='100vw'
justifyContent='center'
alignItems='center'
zIndex={1}
>
<FailureImage
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
zIndex: 0,
}}
/>
<Box is='section' color='pure-white' zIndex={1}>
<Margins block='x12'>
<Box display='flex' flexDirection='column'>
<Margins block='x8' inline='auto'>
<Box fontScale='h1'>{t('loadingError.announcement')}</Box>

<Box fontScale='p1'>{t('loadingError.title')}</Box>
</Margins>
</Box>
</Margins>
<Box fontScale='p1'>{t('loadingError.title')}</Box>
</Margins>
</Box>
</Margins>

<Box>
{isReloading && (
<Margins block='x12'>
<Throbber inheritColor size='x16' />
</Margins>
)}
<Box>
{isReloading && (
<Margins block='x12'>
<Throbber inheritColor size='x16' />
</Margins>
)}

{!isReloading && (
<ButtonGroup align='center'>
<Button primary onClick={handleReloadButtonClick}>
{t('loadingError.reload')} ({counter})
</Button>
</ButtonGroup>
)}
</Box>
</Box>
</ErrorPane>
{!isReloading && (
<ButtonGroup align='center'>
<Button primary onClick={handleReloadButtonClick}>
{t('loadingError.reload')} ({counter})
</Button>
</ButtonGroup>
)}
</Box>
</Box>
</Box>
))}
</>
);
};

Expand Down
1 change: 0 additions & 1 deletion src/ui/components/ServersView/UnsupportedServer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 78515db

Please sign in to comment.