mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-16 16:14:43 -04:00
Use more show-if
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
parent
7b5b73a289
commit
f2e273fc40
9 changed files with 76 additions and 85 deletions
|
@ -1,6 +1,7 @@
|
|||
import React from 'react'
|
||||
import { Alert } from 'react-bootstrap'
|
||||
import { ForkAwesomeIcon } from '../../fork-awesome/fork-awesome-icon'
|
||||
import { ShowIf } from '../common/show-if'
|
||||
|
||||
export interface LoadingScreenProps {
|
||||
failedTitle: string
|
||||
|
@ -13,16 +14,12 @@ export const LoadingScreen: React.FC<LoadingScreenProps> = ({ failedTitle }) =>
|
|||
<ForkAwesomeIcon icon="file-text" size="5x"
|
||||
className={failedTitle ? 'animation-shake' : 'animation-pulse'}/>
|
||||
</div>
|
||||
{
|
||||
failedTitle !== ''
|
||||
? (
|
||||
<Alert variant={'danger'}>
|
||||
The task '{failedTitle}' failed.<br/>
|
||||
For further information look into the browser console.
|
||||
</Alert>
|
||||
)
|
||||
: null
|
||||
}
|
||||
<ShowIf condition={ failedTitle !== ''}>
|
||||
<Alert variant={'danger'}>
|
||||
The task '{failedTitle}' failed.<br/>
|
||||
For further information look into the browser console.
|
||||
</Alert>
|
||||
</ShowIf>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue