mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 01:35:18 -04:00
Fix type error in error-boundary.tsx
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
18026fdd94
commit
68de268515
1 changed files with 4 additions and 3 deletions
|
@ -4,7 +4,7 @@
|
||||||
SPDX-License-Identifier: AGPL-3.0-only
|
SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { ErrorInfo, ReactElement, ReactNodeArray } from 'react'
|
import type { ErrorInfo, ReactNode } from 'react'
|
||||||
import React, { Component } from 'react'
|
import React, { Component } from 'react'
|
||||||
import { Button, Container } from 'react-bootstrap'
|
import { Button, Container } from 'react-bootstrap'
|
||||||
import links from '../../links.json'
|
import links from '../../links.json'
|
||||||
|
@ -38,7 +38,7 @@ export class ErrorBoundary extends Component {
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
render(): ReactElement | undefined | null | string | number | boolean | Record<string, unknown> | ReactNodeArray {
|
render(): ReactNode | undefined {
|
||||||
if (this.state.hasError) {
|
if (this.state.hasError) {
|
||||||
return (
|
return (
|
||||||
<Container className='text-light d-flex flex-column mvh-100'>
|
<Container className='text-light d-flex flex-column mvh-100'>
|
||||||
|
@ -62,7 +62,8 @@ export class ErrorBoundary extends Component {
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
)
|
)
|
||||||
|
} else {
|
||||||
|
return this.props.children
|
||||||
}
|
}
|
||||||
return this.props.children
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue