Skip to content

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

Mock in brick wall

Terry Sutton427dcf4a1fe8
diff --git a/apps/www/components/LaunchWeek/LaunchSection/TicketBrickWall.tsx b/apps/www/components/LaunchWeek/LaunchSection/TicketBrickWall.tsx
index 53aa8f9c62a..4bf72eb94c5 100644
--- a/apps/www/components/LaunchWeek/LaunchSection/TicketBrickWall.tsx
+++ b/apps/www/components/LaunchWeek/LaunchSection/TicketBrickWall.tsx
@@ -1,38 +1,54 @@
-import React from 'react'
+import React, { useState } from 'react'
+import { UserData } from '../Ticket/hooks/use-conf-data'
import Ticket from '../Ticket/Ticket'
+import TicketContainer from '../Ticket/TicketContainer'
+import { createClient, Session, SupabaseClient } from '@supabase/supabase-js'
+import TicketVisual from '../Ticket/TicketVisual'
+import TicketProfile from '../Ticket/TicketProfile'
+import TicketHeader from '../Ticket/TicketHeader'
+import TicketNumber from '../Ticket/TicketNumber'
-interface User {
- username: string | null
- name: string | null
- ticketNumber: number | null
- golden: boolean
- referrals: number
-}
-
+type user = UserData
interface Props {
- users: User[]
+ users: user[]
}
export default function TicketBrickWall({ users }: Props) {
- console.log(users)
+ const [supabase] = useState(() =>
+ createClient(process.env.NEXT_PUBLIC_SUPABASE_URL!, process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!)
+ )
+
return (
- <div className="">
- <div className="max-w-[38rem] mx-auto">
+ <div className="mx-auto overflow-hidden">
+ <div className="max-w-[38rem] mx-auto ">
<h2 className="radial-gradient-text-scale-500 text-center">
Explore the unique tickets generated by our community
</h2>
- <div>
- {users.map((user) => (
- <></>
- // <Ticket
- // username={user.username}
- // name={user.name}
- // ticketNumber={user.ticketNumber}
- // golden={user.golden}
- // referrals={user.referrals ?? 0}
- // />
- ))}
- </div>
+ </div>
+ <div className="flex gap-4 flex-wrap justify-center -ml-48">
+ {users.map((user, i) => (
+ <div
+ className={`relative w-[450px] h-[230px] border border-red-100 rounded-2xl ${
+ i === 3 ? 'ml-48' : ''
+ }`}
+ >
+ <TicketHeader size="small" />
+ <div className="rounded-full grid gap-4 mx-auto justify-center mt-8">
+ <img
+ src={`https://github.com/${user.username}.png`}
+ alt={user.username}
+ className="w-20 h-20 rounded-full"
+ />
+ <div className="text-center">
+ <h3 className="gradient-text-scale-500 text-xl">
+ {user.name ? user.name : user.username}
+ </h3>
+ {user.name && <p className="gradient-text-scale-500 text-sm">@{user.username}</p>}
+ </div>
+ </div>
+ <TicketNumber number={user.ticketNumber} size="small" />
+ </div>
+ ))}
</div>
</div>
)
diff --git a/apps/www/components/LaunchWeek/Ticket/TicketForm.tsx b/apps/www/components/LaunchWeek/Ticket/TicketForm.tsx
index d78034e4092..087122acdb2 100644
--- a/apps/www/components/LaunchWeek/Ticket/TicketForm.tsx
+++ b/apps/www/components/LaunchWeek/Ticket/TicketForm.tsx
@@ -17,7 +17,7 @@ type TicketGenerationState = 'default' | 'loading'
type Props = {
defaultUsername?: string
ticketGenerationState?: TicketGenerationState
- setTicketGenerationState: (ticketGenerationState: TicketGenerationState) => void
+ setTicketGenerationState: any
}
export default function TicketForm({ defaultUsername = '', setTicketGenerationState }: Props) {
diff --git a/apps/www/components/LaunchWeek/Ticket/TicketHeader.tsx b/apps/www/components/LaunchWeek/Ticket/TicketHeader.tsx
new file mode 100644
index 00000000000..2851344e742
--- /dev/null
+++ b/apps/www/components/LaunchWeek/Ticket/TicketHeader.tsx
@@ -0,0 +1,27 @@
+import React from 'react'
+import { DATE } from '~/lib/constants'
+
+interface Props {
+ size?: 'default' | 'small'
+}
+export default function TicketHeader({ size }: Props) {
+ return (
+ <div className="flex w-full justify-center pt-4" id="wayfinding--ticket-header">
+ <div className="flex items-center gap-6">
+ <img
+ className={size === 'small' ? 'w-[165px]' : ''}
+ src={`/images/launchweek/ticket-header-logo.svg`}
+ />
+ <span className="text-white text-[10px]">{DATE}</span>
+ {/*<div id="wayfinding--TicketInfo-container">
+ <TicketInfoFooter
+ golden={golden}
+ logoTextSecondaryColor={
+ ticketNumber ? (golden ? '#F2C94C' : 'var(--brand)') : undefined
+ }
+ />
+ </div>*/}
+ </div>
+ </div>
+ )
+}
diff --git a/apps/www/components/LaunchWeek/Ticket/ticket-number.tsx b/apps/www/components/LaunchWeek/Ticket/TicketNumber.tsx
similarity index 59%
rename from apps/www/components/LaunchWeek/Ticket/ticket-number.tsx
rename to apps/www/components/LaunchWeek/Ticket/TicketNumber.tsx
index f7d4d8b5551..d1c17e86467 100644
--- a/apps/www/components/LaunchWeek/Ticket/ticket-number.tsx
+++ b/apps/www/components/LaunchWeek/Ticket/TicketNumber.tsx
@@ -1,28 +1,41 @@
type Props = {
number: number | undefined
+ size?: 'default' | 'small'
}
-export default function TicketNumber({ number }: Props) {
+export default function TicketNumber({ number, size }: Props) {
const numDigits = `${number}`.length
const prefix = `00000000`.slice(numDigits)
return (
<>
<div
- className="absolute bottom-10 lg:bottom-0 right-24 dark:text-white"
+ className={[
+ 'absolute bottom-10 lg:bottom-0 dark:text-white',
+ size === 'small' ? 'right-12' : 'right-24',
+ ].join(' ')}
id="wayfinding--ticket-number-outer"
>
<div
- className="text-[42px] leading-[1] w-[370px] text-center bg-clip-text lg:transform lg:rotate-90 lg:translate-y-100 origin-bottom-right bg-gradient-to-r from-white via-white"
+ className={[
+ 'text-[42px] leading-[1] w-[370px] text-center bg-clip-text lg:transform lg:rotate-90 lg:translate-y-100 origin-bottom-right bg-gradient-to-r from-white via-white',
+ size === 'small' ? 'text-[20px] w-[220px]' : '',
+ ].join(' ')}
id="wayfinding--ticket-number-inner"
>
№ {prefix}
{number}
</div>
</div>
- <div className="absolute right-28 top-3 w-4 h-[290px]" id="wayfinding--ticket-stitch">
+ <div
+ className={[
+ 'absolute right-28 top-3 w-4',
+ size === 'small' ? 'h-[200px] right-12' : 'h-[290px] right-28',
+ ].join(' ')}
+ id="wayfinding--ticket-stitch"
+ >
<svg
width="2"
- height="328"
+ height={size === 'small' ? '210' : '328'}
viewBox="0 0 2 328"
fill="none"
xmlns="http://www.w3.org/2000/svg"
diff --git a/apps/www/components/LaunchWeek/Ticket/TicketProfile.tsx b/apps/www/components/LaunchWeek/Ticket/TicketProfile.tsx
index 219e57e391a..6d81d7d99e7 100644
--- a/apps/www/components/LaunchWeek/Ticket/TicketProfile.tsx
+++ b/apps/www/components/LaunchWeek/Ticket/TicketProfile.tsx
@@ -9,8 +9,8 @@ type Props = {
name?: string
username?: string
size?: number
- ticketGenerationState: TicketGenerationState
- setTicketGenerationState: (ticketGenerationState: TicketGenerationState) => void
+ ticketGenerationState?: TicketGenerationState
+ setTicketGenerationState?: (ticketGenerationState: TicketGenerationState) => void
golden?: boolean
}
diff --git a/apps/www/components/LaunchWeek/Ticket/ticket-visual.tsx b/apps/www/components/LaunchWeek/Ticket/TicketVisual.tsx
similarity index 71%
rename from apps/www/components/LaunchWeek/Ticket/ticket-visual.tsx
rename to apps/www/components/LaunchWeek/Ticket/TicketVisual.tsx
index 223d7a0904a..7546309897d 100644
--- a/apps/www/components/LaunchWeek/Ticket/ticket-visual.tsx
+++ b/apps/www/components/LaunchWeek/Ticket/TicketVisual.tsx
@@ -1,13 +1,14 @@
import styles from './ticket-visual.module.css'
import TicketProfile from './TicketProfile'
-import TicketNumber from './ticket-number'
+import TicketNumber from './TicketNumber'
import TicketMono from './ticket-mono'
import TicketInfoFooter from './ticket-info-footer'
import TicketMonoMobile from './ticket-mono-mobile'
import cn from 'classnames'
import { useRouter } from 'next/router'
import { DATE } from '~/lib/constants'
-import useConfData from '~/components/LaunchWeek/Ticket//hooks/use-conf-data'
+import useConfData from '~/components/LaunchWeek/Ticket/hooks/use-conf-data'
+import TicketHeader from './TicketHeader'
type TicketGenerationState = 'default' | 'loading'
type Props = {
@@ -16,7 +17,7 @@ type Props = {
ticketNumber?: number
username?: string
ticketGenerationState?: TicketGenerationState
- setTicketGenerationState: (ticketGenerationState: TicketGenerationState) => void
+ setTicketGenerationState?: any
golden?: boolean
}
@@ -49,20 +50,7 @@ export default function TicketVisual({
}}
id="wayfinding--ticket-visual-inner-container"
>
- <div className="flex w-full justify-center pt-4" id="wayfinding--ticket-header">
- <div className="flex items-center gap-6">
- <img src={`/images/launchweek/ticket-header-logo.svg`} />
- <span className="text-white text-xs">{DATE}</span>
- {/*<div id="wayfinding--TicketInfo-container">
- <TicketInfoFooter
- golden={golden}
- logoTextSecondaryColor={
- ticketNumber ? (golden ? '#F2C94C' : 'var(--brand)') : undefined
- }
- />
- </div>*/}
- </div>
- </div>
+ <TicketHeader />
<div className={cn(styles['horizontal-ticket'])} id="wayfinding--TicketMono-container">
<TicketMono golden={golden} />
</div>
diff --git a/apps/www/components/LaunchWeek/Ticket/hooks/use-conf-data.ts b/apps/www/components/LaunchWeek/Ticket/hooks/use-conf-data.ts
index 2588205aaf6..a13d3ce5066 100644
--- a/apps/www/components/LaunchWeek/Ticket/hooks/use-conf-data.ts
+++ b/apps/www/components/LaunchWeek/Ticket/hooks/use-conf-data.ts
@@ -26,6 +26,7 @@ export const ConfDataContext = createContext<ConfDataContextType | null>(null)
export default function useConfData() {
const result = useContext(ConfDataContext)
+ console.log('result', result)
if (!result) {
throw new Error()
}
diff --git a/apps/www/components/LaunchWeek/Ticket/ticket-image.tsx b/apps/www/components/LaunchWeek/Ticket/ticket-image.tsx
index fd44830b40c..b9ba7f91e87 100644
--- a/apps/www/components/LaunchWeek/Ticket/ticket-image.tsx
+++ b/apps/www/components/LaunchWeek/Ticket/ticket-image.tsx
@@ -1,6 +1,6 @@
import { useRouter } from 'next/router'
import Head from 'next/head'
-import TicketVisual from './ticket-visual'
+import TicketVisual from './TicketVisual'
import styles from './ticket-image.module.css'
export default function TicketImage() {
diff --git a/apps/www/components/LaunchWeek/Ticket/ticket.tsx b/apps/www/components/LaunchWeek/Ticket/ticket.tsx
index 1a2cf50ea94..720b8396f50 100644
--- a/apps/www/components/LaunchWeek/Ticket/ticket.tsx
+++ b/apps/www/components/LaunchWeek/Ticket/ticket.tsx
@@ -7,7 +7,7 @@ import { useRef, useEffect, useState } from 'react'
import styles from './ticket.module.css'
import styleUtils from './utils.module.css'
import TicketForm from './TicketForm'
-import TicketVisual from './ticket-visual'
+import TicketVisual from './TicketVisual'
import TicketActions from './TicketActions'
import TicketCopy from './ticket-copy'
import { DATE, SITE_NAME } from '~/lib/constants'
diff --git a/apps/www/pages/launch-week/tickets/[username].tsx b/apps/www/pages/launch-week/tickets/[username].tsx
index e48dd38606e..1b421c71b87 100644
--- a/apps/www/pages/launch-week/tickets/[username].tsx
+++ b/apps/www/pages/launch-week/tickets/[username].tsx
@@ -12,18 +12,11 @@ import { useTheme } from 'common/Providers'
import LaunchWeekPrizeSection from '~/components/LaunchWeek/LaunchSection/LaunchWeekPrizeSection'
import { LaunchWeekLogoHeader } from '~/components/LaunchWeek/LaunchSection/LaunchWeekLogoHeader'
import TicketBrickWall from '~/components/LaunchWeek/LaunchSection/TicketBrickWall'
+import { UserData } from '~/components/LaunchWeek/Ticket/hooks/use-conf-data'
interface Props {
- user: user
- users: user[]
-}
-
-interface user {
- username: string | null
- name: string | null
- ticketNumber: number | null
- golden: boolean
- referrals: number
+ user: UserData
+ users: UserData[]
}
const supabaseAdmin = createClient(
diff --git a/apps/www/public/sitemap_www.xml b/apps/www/public/sitemap_www.xml
index 32fbccd02b7..f65b88a2564 100644
--- a/apps/www/public/sitemap_www.xml
+++ b/apps/www/public/sitemap_www.xml
@@ -73,13 +73,13 @@
</url>
<url>
- <loc>https://supabase.com/edge-functions</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/edge-functions</loc>
<changefreq>weekly</changefreq>
<changefreq>0.5</changefreq>
</url>