Fix react 18 changes

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2022-04-09 23:16:06 +02:00
parent 833a5d35a4
commit 931302cbec
20 changed files with 47 additions and 22 deletions

View file

@ -4,6 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import type { PropsWithChildren } from 'react'
import React, { Fragment } from 'react'
import { Trans, useTranslation } from 'react-i18next'
import { WaitSpinner } from './wait-spinner/wait-spinner'
@ -24,7 +25,7 @@ export interface AsyncLoadingBoundaryProps {
* @param componentName The name of the component that is currently loading. It will be shown in the error message.
* @param children The child {@link ReactElement elements} that are only shown if the component isn't in loading or error state
*/
export const AsyncLoadingBoundary: React.FC<AsyncLoadingBoundaryProps> = ({
export const AsyncLoadingBoundary: React.FC<PropsWithChildren<AsyncLoadingBoundaryProps>> = ({
loading,
error,
componentName,