mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-15 07:34:42 -04:00
Fix react 18 changes
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
833a5d35a4
commit
931302cbec
20 changed files with 47 additions and 22 deletions
|
@ -4,12 +4,13 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import type { PropsWithChildren } from 'react'
|
||||
import React, { Fragment } from 'react'
|
||||
|
||||
export interface ShowIfProps {
|
||||
condition: boolean
|
||||
}
|
||||
|
||||
export const ShowIf: React.FC<ShowIfProps> = ({ children, condition }) => {
|
||||
export const ShowIf: React.FC<PropsWithChildren<ShowIfProps>> = ({ children, condition }) => {
|
||||
return condition ? <Fragment>{children}</Fragment> : null
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue