maintenance.tsx 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. import { RefreshCw } from 'lucide-react'
  2. import { useTheme } from 'next-themes'
  3. import Head from 'next/head'
  4. import { useMemo } from 'react'
  5. import { Button, cn } from 'ui'
  6. import { BASE_PATH } from '@/lib/constants'
  7. import type { NextPageWithLayout } from '@/types'
  8. const MaintenancePage: NextPageWithLayout = () => {
  9. const { resolvedTheme } = useTheme()
  10. const isDarkMode = resolvedTheme?.includes('dark')
  11. const imgUrl = useMemo(
  12. () =>
  13. isDarkMode ? `${BASE_PATH}/img/briven-dark.svg` : `${BASE_PATH}/img/briven-light.svg`,
  14. [isDarkMode]
  15. )
  16. return (
  17. <>
  18. <Head>
  19. <title>Briven | Under Maintenance</title>
  20. </Head>
  21. <div className="flex flex-col items-center gap-6 text-center">
  22. <div className="flex items-center justify-center mb-4">
  23. <img src={imgUrl} alt="Briven" className="h-8" />
  24. </div>
  25. <div className="space-y-1">
  26. <h1 className="text-2xl font-medium text-foreground">Under Maintenance</h1>
  27. <p className="text-foreground-light max-w-xs mx-auto">
  28. We are currently improving our services. The dashboard will be back online shortly.
  29. </p>
  30. </div>
  31. <p className="text-sm text-foreground-lighter max-w-xs mx-auto">
  32. If you need support while the dashboard is inaccessible, you can email us at{' '}
  33. <a
  34. href="mailto:support+maintenance@supabase.io"
  35. className="text-foreground-light underline hover:text-foreground"
  36. >
  37. support+maintenance@supabase.io
  38. </a>
  39. </p>
  40. <div className="flex flex-col items-center gap-2 mt-4">
  41. <p className="text-sm text-foreground-lighter">
  42. Reload the page to check if the maintenance window has ended
  43. </p>
  44. <Button onClick={() => window.location.reload()} type="primary" icon={<RefreshCw />}>
  45. Reload
  46. </Button>
  47. </div>
  48. </div>
  49. </>
  50. )
  51. }
  52. MaintenancePage.getLayout = (page) => (
  53. <div
  54. className={cn(
  55. 'flex h-full min-h-screen bg-studio',
  56. 'w-full flex-col place-items-center',
  57. 'items-center justify-center gap-8 px-5'
  58. )}
  59. >
  60. {page}
  61. </div>
  62. )
  63. export default MaintenancePage