mirror of
https://github.com/supabase/supabase.git
synced 2026-06-01 10:21:10 +08:00
New Docs IA, mainly splitting up the miscellaneous bucket that is Platform into multiple sections
13 lines
319 B
TypeScript
13 lines
319 B
TypeScript
import { type ReactNode } from 'react'
|
|
|
|
export function ShowUntil({ children, date }: { children: ReactNode; date: string }) {
|
|
const currentDate = new Date()
|
|
const untilDate = new Date(date)
|
|
|
|
if (isNaN(untilDate.getTime()) || currentDate < untilDate) {
|
|
return <>{children}</>
|
|
} else {
|
|
return null
|
|
}
|
|
}
|