Files
supabase/apps/studio/pages/join.tsx
Joshen Lim b4d38fabd0 Chore/barrel files bye part 05 (#40016)
* Clean up barrel files part 4

* nit

* Part 5 of cleaning up barrel files

* Revert changes for types

* Nit
2025-10-31 13:15:31 +08:00

49 lines
1.3 KiB
TypeScript

import Link from 'next/link'
import { OrganizationInvite } from 'components/interfaces/OrganizationInvite/OrganizationInvite'
import { BASE_PATH } from 'lib/constants'
import { useTheme } from 'next-themes'
import { useEffect, useMemo, useState } from 'react'
import type { NextPageWithLayout } from 'types'
import { cn } from 'ui'
const JoinOrganizationPage: NextPageWithLayout = () => {
const { resolvedTheme } = useTheme()
const isDarkMode = resolvedTheme?.includes('dark')
const [mounted, setMounted] = useState(false)
const imgUrl = useMemo(
() =>
isDarkMode ? `${BASE_PATH}/img/supabase-dark.svg` : `${BASE_PATH}/img/supabase-light.svg`,
[isDarkMode]
)
useEffect(() => setMounted(true), [])
return (
<>
<Link href="/projects" className="flex items-center justify-center gap-4">
{mounted && (
<img src={imgUrl} alt="Supabase" className="block h-[24px] cursor-pointer rounded" />
)}
</Link>
<OrganizationInvite />
</>
)
}
JoinOrganizationPage.getLayout = (page) => (
<div
className={cn(
'flex h-full min-h-screen bg-studio',
'w-full flex-col place-items-center',
'items-center justify-center gap-8 px-5'
)}
>
{page}
</div>
)
export default JoinOrganizationPage