mirror of
https://github.com/supabase/supabase.git
synced 2026-07-03 19:54:38 +08:00
20 lines
385 B
TypeScript
20 lines
385 B
TypeScript
import { ReactNode } from 'react'
|
|
import { logConstants } from 'shared-data'
|
|
|
|
const sharedData = {
|
|
logConstants,
|
|
}
|
|
|
|
function SharedData({
|
|
data,
|
|
children,
|
|
}: {
|
|
data: keyof typeof sharedData
|
|
children: (selectedData: (typeof sharedData)[keyof typeof sharedData]) => ReactNode
|
|
}) {
|
|
const selectedData = sharedData[data]
|
|
return children(selectedData)
|
|
}
|
|
|
|
export { SharedData }
|