mirror of
https://github.com/supabase/supabase.git
synced 2026-07-06 22:34:54 +08:00
* Move all studio files from /studio to /apps/studio. * Move studio specific prettier ignores. * Fix the ui references from studio. * Fix the css imports. * Fix all package.json issues. * Fix the prettier setup for the studio app. * Add .turbo folder to prettierignore. * Fix the github workflows.
13 lines
344 B
TypeScript
13 lines
344 B
TypeScript
import { cloneElement } from 'react'
|
|
|
|
type ConditionalWrapProps = {
|
|
condition: boolean
|
|
wrap: (children: JSX.Element | null) => JSX.Element
|
|
children: JSX.Element | null
|
|
}
|
|
|
|
const ConditionalWrap = ({ condition, children, wrap }: ConditionalWrapProps) =>
|
|
condition ? cloneElement(wrap(children)) : children
|
|
|
|
export default ConditionalWrap
|