mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-08 10:22:47 -04:00
refactor: remove show-if in favour of conditionals
This prevents a problem where show-if can trigger an error if a value is checked to exist with it. Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
8884bbb428
commit
f701f8d05f
52 changed files with 239 additions and 352 deletions
|
@ -1,9 +1,8 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
||||
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
import { ShowIf } from '../../common/show-if/show-if'
|
||||
import styles from '../application-loader.module.scss'
|
||||
import { LoadingAnimation } from './loading-animation'
|
||||
import type { ReactElement } from 'react'
|
||||
|
@ -27,9 +26,7 @@ export const LoadingScreen: React.FC<LoadingScreenProps> = ({ errorMessage }) =>
|
|||
<LoadingAnimation error={!!errorMessage} />
|
||||
</span>
|
||||
</div>
|
||||
<ShowIf condition={!!errorMessage}>
|
||||
<Alert variant={'danger'}>{errorMessage}</Alert>
|
||||
</ShowIf>
|
||||
{errorMessage !== undefined && <Alert variant={'danger'}>{errorMessage}</Alert>}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue