mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 09:55:06 +03:00
35 lines
976 B
TypeScript
35 lines
976 B
TypeScript
import { useRouter } from 'next/router'
|
|
import type { ReactElement } from 'react'
|
|
import { useEffect } from 'react'
|
|
|
|
import { LinkSupportTicketPage } from '@/components/interfaces/Support/LinkSupportTicketPage'
|
|
import { AppLayout } from '@/components/layouts/AppLayout/AppLayout'
|
|
import { DefaultLayout } from '@/components/layouts/DefaultLayout'
|
|
import { withAuth } from '@/hooks/misc/withAuth'
|
|
import { IS_PLATFORM } from '@/lib/constants'
|
|
import type { NextPageWithLayout } from '@/types'
|
|
|
|
const LinkSupportTicketPageRoute: NextPageWithLayout = () => {
|
|
const router = useRouter()
|
|
|
|
useEffect(() => {
|
|
if (!IS_PLATFORM) {
|
|
router.push('/404')
|
|
}
|
|
}, [router])
|
|
|
|
if (!IS_PLATFORM) {
|
|
return null
|
|
}
|
|
|
|
return <LinkSupportTicketPage />
|
|
}
|
|
|
|
LinkSupportTicketPageRoute.getLayout = (page: ReactElement) => (
|
|
<AppLayout>
|
|
<DefaultLayout>{page}</DefaultLayout>
|
|
</AppLayout>
|
|
)
|
|
|
|
export default withAuth(LinkSupportTicketPageRoute, { useHighestAAL: false })
|