mirror of
https://github.com/MeshEnvy/mesh-forge.git
synced 2026-03-28 17:42:55 +01:00
17 lines
390 B
TypeScript
17 lines
390 B
TypeScript
interface SourceAvailableProps {
|
|
sourcePath: string | undefined
|
|
children: React.ReactNode
|
|
}
|
|
|
|
/**
|
|
* Component that only renders children when sourcePath is available.
|
|
* Uses the sourcePath field from the build instead of polling.
|
|
*/
|
|
export function SourceAvailable({ sourcePath, children }: SourceAvailableProps) {
|
|
if (!sourcePath) {
|
|
return null
|
|
}
|
|
|
|
return <>{children}</>
|
|
}
|