Files
supabase/apps/studio/pages/support/link.tsx
barcofourie f5d9cb1b60 feat: adds link conversation support form (#40553)
* feat: adds link conversation support form

* style: fixes prettier styling issues

* fix: type checking errors

* feat: adds redirect to 404 for self hosted

* style: prettier formatting
2025-11-20 08:23:20 -07:00

34 lines
955 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 type { NextPageWithLayout } from 'types'
import { IS_PLATFORM } from 'lib/constants'
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 })