mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 14:44:43 -04:00
Adapt react-client to use the real backend API (#1545)
Co-authored-by: Philip Molares <philip.molares@udo.edu> Co-authored-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
3399ed2023
commit
26f90505ff
227 changed files with 4726 additions and 2310 deletions
|
@ -12,7 +12,7 @@ import { Alert } from 'react-bootstrap'
|
|||
|
||||
export interface AsyncLoadingBoundaryProps {
|
||||
loading: boolean
|
||||
error?: boolean
|
||||
error?: Error | boolean
|
||||
componentName: string
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ export const AsyncLoadingBoundary: React.FC<PropsWithChildren<AsyncLoadingBounda
|
|||
children
|
||||
}) => {
|
||||
useTranslation()
|
||||
if (error === true) {
|
||||
if (error !== undefined && error !== false) {
|
||||
return (
|
||||
<Alert variant={'danger'}>
|
||||
<Trans i18nKey={'common.errorWhileLoading'} values={{ name: componentName }} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue