Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Fix tickets ssr

Terry Sutton721a0f37e1f3
diff --git a/apps/www/pages/launch-week/tickets/index.tsx b/apps/www/pages/launch-week/tickets/index.tsx
index 98adb764576..01bf60425d1 100644
--- a/apps/www/pages/launch-week/tickets/index.tsx
+++ b/apps/www/pages/launch-week/tickets/index.tsx
@@ -1,27 +1,14 @@
import { NextSeo } from 'next-seo'
-import { GetStaticProps, GetStaticPaths } from 'next'
import DefaultLayout from '~/components/Layouts/Default'
import SectionContainer from '~/components/Layouts/SectionContainer'
import TicketContainer from '~/components/LaunchWeek/Ticket/TicketContainer'
-import { SITE_URL, SAMPLE_TICKET_NUMBER } from '~/lib/constants'
+import { SITE_URL } from '~/lib/constants'
import { useRouter } from 'next/router'
import { createClient, Session, SupabaseClient } from '@supabase/supabase-js'
import { useState, useEffect } from 'react'
import { useTheme } from 'common/Providers'
-import { UserData } from '~/components/LaunchWeek/Ticket/hooks/use-conf-data'
-import TicketBrickWall from '~/components/LaunchWeek/LaunchSection/TicketBrickWall'
-interface Props {
- users: UserData[]
-}
-
-const supabaseAdmin = createClient(
- process.env.NEXT_PUBLIC_SUPABASE_URL ?? 'http://localhost:54321',
- process.env.SUPABASE_SERVICE_ROLE_SECRET ??
- 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im9idWxkYW5ycHRsb2t0eGNmZnZuIiwicm9sZSI6ImFub24iLCJpYXQiOjE2Njk3MjcwMTIsImV4cCI6MTk4NTMwMzAxMn0.SZLqryz_-stF8dgzeVXmzZWPOqdOrBwqJROlFES8v3I'
-)
-
-export default function TicketHome({ users }: Props) {
+export default function TicketHome() {
const { isDarkMode } = useTheme()
const [supabase, setSupabase] = useState<SupabaseClient | null>(null)
@@ -102,27 +89,7 @@ export default function TicketHome({ users }: Props) {
/>
)}
</SectionContainer>
- {users && <TicketBrickWall users={users} />}
</DefaultLayout>
</>
)
}
-
-export const getStaticProps: GetStaticProps = async ({ params }) => {
- // fetch users for the TicketBrickWall
- const { data: users } = await supabaseAdmin!.from('lw7_tickets').select().limit(8)
-
- return {
- props: {
- users,
- },
- revalidate: 5,
- }
-}
-
-export const getStaticPaths: GetStaticPaths = async () => {
- return Promise.resolve({
- paths: [],
- fallback: 'blocking',
- })
-}
diff --git a/apps/www/public/sitemap_www.xml b/apps/www/public/sitemap_www.xml
index 52502f0c0e3..1c55d3c93a7 100644
--- a/apps/www/public/sitemap_www.xml
+++ b/apps/www/public/sitemap_www.xml
@@ -67,13 +67,13 @@
</url>
<url>
- <loc>https://supabase.com/contact/mfa</loc>
+ <loc>https://supabase.com/database</loc>
<changefreq>weekly</changefreq>
<changefreq>0.5</changefreq>
</url>
<url>
- <loc>https://supabase.com/database</loc>
+ <loc>https://supabase.com/contact/mfa</loc>
<changefreq>weekly</changefreq>
<changefreq>0.5</changefreq>
</url>
@@ -85,13 +85,13 @@
</url>
<url>
- <loc>https://supabase.com/launch-week/ticket-image</loc>
+ <loc>https://supabase.com/legal/dpa</loc>
<changefreq>weekly</changefreq>
<changefreq>0.5</changefreq>
</url>
<url>
- <loc>https://supabase.com/legal/dpa</loc>
+ <loc>https://supabase.com/launch-week/ticket-image</loc>
<changefreq>weekly</changefreq>
<changefreq>0.5</changefreq>
</url>