Skip to content

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

Reorganize components

Terry Sutton0dd56e555e38
diff --git a/apps/www/components/LaunchWeek/LaunchSection/LaunchWeekLogoHeader.tsx b/apps/www/components/LaunchWeek/LaunchSection/LaunchWeekLogoHeader.tsx
new file mode 100644
index 00000000000..c2c472c0007
--- /dev/null
+++ b/apps/www/components/LaunchWeek/LaunchSection/LaunchWeekLogoHeader.tsx
@@ -0,0 +1,25 @@
+import classNames from 'classnames'
+import styleUtils from '~/components/LaunchWeek/Ticket/utils.module.css'
+import Image from 'next/image'
+
+export function LaunchWeekLogoHeader() {
+ return (
+ <div className="flex flex-col gap-3 items-center justify-center xl:justify-start">
+ <div
+ className={classNames(
+ styleUtils.appear,
+ styleUtils['appear-first'],
+ 'flex flex-col justify-center gap-3'
+ )}
+ >
+ <h1 className="flex gap-[24px] justify-center font-normal uppercase text-[32px] items-center">
+ <span className="tracking-[4px] text-white">Launch week</span>
+ <span className="flex justify-center">
+ <Image src="/images/launchweek/seven/lw7-seven.svg" width={40} height={40} />
+ </span>
+ </h1>
+ <p className="text-white text-sm text-center">April 3rd – 7th at 6 AM PT | 9 AM ET</p>
+ </div>
+ </div>
+ )
+}
diff --git a/apps/www/components/LaunchWeek/LaunchSection/LaunchWeekPrizeSection.tsx b/apps/www/components/LaunchWeek/LaunchSection/LaunchWeekPrizeSection.tsx
new file mode 100644
index 00000000000..e7e0673a78d
--- /dev/null
+++ b/apps/www/components/LaunchWeek/LaunchSection/LaunchWeekPrizeSection.tsx
@@ -0,0 +1,90 @@
+import Image from 'next/image'
+import React from 'react'
+import LabelBadge from '../LabelBadge'
+
+export default function LaunchWeekPrizeSection() {
+ return (
+ <div>
+ <div className="mt-24 relative h-[640px] overflow-hidden">
+ <div className="-ml-[24rem] -mr-[24rem]">
+ <Image src="/images/launchweek/seven/lw-7-bg.svg" layout="fill" objectFit="cover" />
+ </div>
+ </div>
+
+ <div className="text-center -mt-56 relative z-10 text-white">
+ <div className="max-w-[38rem] mx-auto">
+ <Image src="/images/launchweek/seven/lw7-seven.svg" width={40} height={40} />
+ <h2 className="text-4xl mt-2">
+ Get your <span className="gradient-text-purple-500">winning ticket</span>
+ </h2>
+ <p className="mt-4 radial-gradient-text-scale-500" id="lw-7-prizes">
+ Mark your calendars for April 9th and join us on Discord for Launch Week 7's final day
+ to find out if you're one of the lucky winners. Get sharing!
+ </p>
+ </div>
+ <div className="bg-lw7-black-transition h-24"></div>
+ </div>
+ <div className="bg-black text-white">
+ <div className="flex gap-4 max-w-7xl mx-auto mb-8">
+ <div className=" w-3/5">
+ <div className="grid gap-4 border border-[#484848] rounded-tr-xl rounded-tl-xl overflow-hidden">
+ <div className="relative h-[360px]">
+ <Image
+ src="/images/launchweek/seven/keyboard.png"
+ layout="fill"
+ objectFit="cover"
+ />
+ </div>
+ <div className="p-6 mt-3">
+ <h3 className="gradient-text-purple-500 font-mono uppercase font-medium">
+ Main award
+ </h3>
+ <h4 className="flex items-center gap-3 text-[19px] mt-4">
+ <Image
+ src="/images/launchweek/seven/icons/compute-upgrade.svg"
+ width={16}
+ height={16}
+ />
+ Supabase Mechanical Keyboard <LabelBadge text="5 pieces" />
+ </h4>
+ <p className="text-scale-1100 mt-1">
+ Increase your chances of winning limited edition 62-Key ISO Custom Mechanical
+ Keyboard by sharing your ticket on Twitter.
+ </p>
+ </div>
+ </div>
+ </div>
+
+ <div className="grid gap-4 w-2/5">
+ <div className="grid relative border border-[#484848] rounded-2xl overflow-hidden">
+ <Image src="/images/launchweek/seven/lw-7-bg.svg" layout="fill" objectFit="cover" />
+ <div className="absolute inset-0 bg-gradient-to-t from-black bg-opacity-50 flex ">
+ <h3 className="mt-auto mb-4 mx-6 text-lg flex items-center gap-4">
+ Limited edition sticker pack <LabelBadge text="20 packs" />
+ </h3>
+ </div>
+ </div>
+ <div className="flex gap-4">
+ <div className="grid relative border border-[#484848] rounded-2xl overflow-hidden w-1/2">
+ <Image src="/images/launchweek/seven/lw-7-bg.svg" layout="fill" objectFit="cover" />
+ <div className="absolute inset-0 bg-gradient-to-t from-black bg-opacity-50 flex ">
+ <h3 className="mt-auto mb-4 mx-6 text-lg flex items-center gap-4">
+ Supa T-shirt <LabelBadge text="10 shirts" />
+ </h3>
+ </div>
+ </div>
+ <div className="grid relative border border-[#484848] rounded-2xl overflow-hidden w-1/2">
+ <Image src="/images/launchweek/seven/lw-7-bg.svg" layout="fill" objectFit="cover" />
+ <div className="absolute inset-0 bg-gradient-to-t from-black bg-opacity-50 flex ">
+ <h3 className="mt-auto mb-4 mx-6 text-lg flex items-center gap-4">
+ Supa socks <LabelBadge text="10 pairs" />
+ </h3>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ )
+}
diff --git a/apps/www/components/LaunchWeek/Ticket/TicketActions.tsx b/apps/www/components/LaunchWeek/Ticket/TicketActions.tsx
new file mode 100644
index 00000000000..fcffadd6582
--- /dev/null
+++ b/apps/www/components/LaunchWeek/Ticket/TicketActions.tsx
@@ -0,0 +1,129 @@
+import { useEffect, useRef, useState } from 'react'
+import { SITE_URL, TWEET_TEXT, TWEET_TEXT_GOLDEN } from '~/lib/constants'
+import { IconCheckCircle, IconDownload, IconGitHub, IconLinkedin, IconTwitter } from 'ui'
+import useConfData from '~/components/LaunchWeek/Ticket//hooks/use-conf-data'
+import LoadingDots from './loading-dots'
+import { useParams } from '~/hooks/useParams'
+import TicketForm from './TicketForm'
+
+type TicketGenerationState = 'default' | 'loading'
+
+type Props = {
+ username: string
+ golden?: boolean
+ ticketGenerationState?: TicketGenerationState
+ setTicketGenerationState: (ticketGenerationState: TicketGenerationState) => void
+}
+
+export default function TicketActions({
+ username,
+ golden = false,
+ ticketGenerationState,
+ setTicketGenerationState,
+}: Props) {
+ const [imgReady, setImgReady] = useState(false)
+ const [loading, setLoading] = useState(false)
+ const downloadLink = useRef<HTMLAnchorElement>()
+ const permalink = encodeURIComponent(`${SITE_URL}/tickets/${username}?v=6`)
+ const text = encodeURIComponent(golden ? TWEET_TEXT_GOLDEN : TWEET_TEXT)
+ const { userData } = useConfData()
+ const tweetUrl = `https://twitter.com/intent/tweet?url=${permalink}&via=supabase&text=${text}`
+ const linkedInUrl = `https://www.linkedin.com/sharing/share-offsite/?url=${permalink}`
+ const downloadUrl = `https://obuldanrptloktxcffvn.functions.supabase.co/lw7-ticket-og?username=${encodeURIComponent(
+ userData.username ?? ''
+ )}`
+ const params = useParams()
+ const sharePage = params.username
+
+ useEffect(() => {
+ setImgReady(false)
+
+ const img = new Image()
+
+ img.src = downloadUrl
+ img.onload = () => {
+ setImgReady(true)
+ setLoading(false)
+ if (downloadLink.current) {
+ downloadLink.current.click()
+ downloadLink.current = undefined
+ }
+ }
+ }, [downloadUrl])
+
+ return (
+ <div className="grid gap-1">
+ {!sharePage ? (
+ <>
+ <div className="rounded-md bg-[#E6E8EB] text-scale-500 py-1 px-3 border border-scale-1100 text-xs mb-1 transition-all ease-out hover:bg-[#dfe1e3]">
+ <a
+ href={tweetUrl}
+ rel="noopener noreferrer"
+ target="_blank"
+ className="flex items-center justify-center gap-2"
+ >
+ <div className="text-scale-900">
+ <IconCheckCircle size={10} strokeWidth={1} />
+ </div>
+ Connect with Github
+ </a>
+ </div>
+ <div
+ className={`rounded-md ${
+ userData.sharedOnTwitter ? 'bg-[#E6E8EB] text-scale-500' : 'text-white'
+ } text-scale-500 py-1 px-3 border border-scale-1100 text-xs mb-1 transition-all ease-out hover:bg-[#dfe1e3]`}
+ >
+ <a
+ href={tweetUrl}
+ rel="noopener noreferrer"
+ target="_blank"
+ className={`flex items-center justify-center gap-2 ${
+ userData.sharedOnTwitter ? 'text-scale-500' : 'text-white hover:text-scale-500'
+ }`}
+ >
+ {userData.sharedOnTwitter && (
+ <div className="text-scale-900">
+ <IconCheckCircle size={10} strokeWidth={1} />
+ </div>
+ )}
+ Share on Twitter
+ </a>
+ </div>
+ <div
+ className={`rounded-md ${
+ userData.sharedOnLinkedIn ? 'bg-[#E6E8EB] text-scale-500' : 'text-white'
+ } text-scale-500 py-1 px-3 border border-scale-1100 text-xs mb-1 transition-all ease-out hover:bg-[#dfe1e3]`}
+ >
+ <a
+ href={linkedInUrl}
+ rel="noopener noreferrer"
+ target="_blank"
+ className={`flex items-center justify-center gap-2 ${
+ userData.sharedOnLinkedIn ? 'text-scale-500' : 'text-white hover:text-scale-500'
+ }`}
+ >
+ {userData.sharedOnLinkedIn && (
+ <div className="text-scale-900">
+ <IconCheckCircle size={10} strokeWidth={1} />
+ </div>
+ )}
+ Share on Linkedin
+ </a>
+ </div>
+ </>
+ ) : (
+ <>
+ {username ? (
+ <></>
+ ) : (
+ <TicketForm
+ defaultUsername={username ?? undefined}
+ ticketGenerationState={ticketGenerationState}
+ setTicketGenerationState={setTicketGenerationState}
+ />
+ )}
+ </>
+ )}
+ </div>
+ )
+}
diff --git a/apps/www/components/LaunchWeek/Ticket/ticket-form.tsx b/apps/www/components/LaunchWeek/Ticket/TicketForm.tsx
similarity index 99%
rename from apps/www/components/LaunchWeek/Ticket/ticket-form.tsx
rename to apps/www/components/LaunchWeek/Ticket/TicketForm.tsx
index 4efc4886137..d78034e4092 100644
--- a/apps/www/components/LaunchWeek/Ticket/ticket-form.tsx
+++ b/apps/www/components/LaunchWeek/Ticket/TicketForm.tsx
@@ -16,6 +16,7 @@ type TicketGenerationState = 'default' | 'loading'
type Props = {
defaultUsername?: string
+ ticketGenerationState?: TicketGenerationState
setTicketGenerationState: (ticketGenerationState: TicketGenerationState) => void
}
diff --git a/apps/www/components/LaunchWeek/Ticket/ticket-profile.tsx b/apps/www/components/LaunchWeek/Ticket/TicketProfile.tsx
similarity index 98%
rename from apps/www/components/LaunchWeek/Ticket/ticket-profile.tsx
rename to apps/www/components/LaunchWeek/Ticket/TicketProfile.tsx
index 8d5b4e25bce..219e57e391a 100644
--- a/apps/www/components/LaunchWeek/Ticket/ticket-profile.tsx
+++ b/apps/www/components/LaunchWeek/Ticket/TicketProfile.tsx
@@ -1,6 +1,6 @@
// import GithubIcon from '~/components/LaunchWeek/Ticket/icons/icon-github'
import cn from 'classnames'
-import TicketForm from './ticket-form'
+import TicketForm from './TicketForm'
// import IconAvatar from '~/components/LaunchWeek/Ticket/icons/icon-avatar'
import styles from './ticket-profile.module.css'
diff --git a/apps/www/components/LaunchWeek/Ticket/ticket-actions.tsx b/apps/www/components/LaunchWeek/Ticket/ticket-actions.tsx
deleted file mode 100644
index 6ea0746c729..00000000000
--- a/apps/www/components/LaunchWeek/Ticket/ticket-actions.tsx
+++ /dev/null
@@ -1,100 +0,0 @@
-import { useEffect, useRef, useState } from 'react'
-import { SITE_URL, TWEET_TEXT, TWEET_TEXT_GOLDEN } from '~/lib/constants'
-import { IconCheckCircle, IconDownload, IconGitHub, IconLinkedin, IconTwitter } from 'ui'
-import useConfData from '~/components/LaunchWeek/Ticket//hooks/use-conf-data'
-import LoadingDots from './loading-dots'
-
-type Props = {
- username: string
- golden?: boolean
-}
-
-export default function TicketActions({ username, golden = false }: Props) {
- const [imgReady, setImgReady] = useState(false)
- const [loading, setLoading] = useState(false)
- const downloadLink = useRef<HTMLAnchorElement>()
- const permalink = encodeURIComponent(`${SITE_URL}/tickets/${username}?v=6`)
- const text = encodeURIComponent(golden ? TWEET_TEXT_GOLDEN : TWEET_TEXT)
- const { userData } = useConfData()
- const tweetUrl = `https://twitter.com/intent/tweet?url=${permalink}&via=supabase&text=${text}`
- const linkedInUrl = `https://www.linkedin.com/sharing/share-offsite/?url=${permalink}`
- const downloadUrl = `https://obuldanrptloktxcffvn.functions.supabase.co/lw7-ticket-og?username=${encodeURIComponent(
- userData.username ?? ''
- )}`
-
- useEffect(() => {
- setImgReady(false)
-
- const img = new Image()
-
- img.src = downloadUrl
- img.onload = () => {
- setImgReady(true)
- setLoading(false)
- if (downloadLink.current) {
- downloadLink.current.click()
- downloadLink.current = undefined
- }
- }
- }, [downloadUrl])
-
- return (
- <div className="grid gap-1">
- <div className="rounded-md bg-[#E6E8EB] text-scale-500 py-1 px-3 border border-scale-1100 text-xs mb-1 transition-all ease-out hover:bg-[#dfe1e3]">
- <a
- href={tweetUrl}
- rel="noopener noreferrer"
- target="_blank"
- className="flex items-center justify-center gap-2"
- >
- <div className="text-scale-900">
- <IconCheckCircle size={10} strokeWidth={1} />
- </div>
- Connect with Github
- </a>
- </div>
- <div
- className={`rounded-md ${
- userData.sharedOnTwitter ? 'bg-[#E6E8EB] text-scale-500' : 'text-white'
- } text-scale-500 py-1 px-3 border border-scale-1100 text-xs mb-1 transition-all ease-out hover:bg-[#dfe1e3]`}
- >
- <a
- href={tweetUrl}
- rel="noopener noreferrer"
- target="_blank"
- className={`flex items-center justify-center gap-2 ${
- userData.sharedOnTwitter ? 'text-scale-500' : 'text-white hover:text-scale-500'
- }`}
- >
- {userData.sharedOnTwitter && (
- <div className="text-scale-900">
- <IconCheckCircle size={10} strokeWidth={1} />
- </div>
- )}
- Share on Twitter
- </a>
- </div>
- <div
- className={`rounded-md ${
- userData.sharedOnLinkedIn ? 'bg-[#E6E8EB] text-scale-500' : 'text-white'
- } text-scale-500 py-1 px-3 border border-scale-1100 text-xs mb-1 transition-all ease-out hover:bg-[#dfe1e3]`}
- >
- <a
- href={linkedInUrl}
- rel="noopener noreferrer"
- target="_blank"
- className={`flex items-center justify-center gap-2 ${
- userData.sharedOnLinkedIn ? 'text-scale-500' : 'text-white hover:text-scale-500'
- }`}
- >
- {userData.sharedOnLinkedIn && (
- <div className="text-scale-900">
- <IconCheckCircle size={10} strokeWidth={1} />
- </div>
- )}
- Share on Linkedin
- </a>
- </div>
- </div>
- )
-}
diff --git a/apps/www/components/LaunchWeek/Ticket/ticket-visual.module.css b/apps/www/components/LaunchWeek/Ticket/ticket-visual.module.css
index 6b1c81c7813..04b800acee0 100644
--- a/apps/www/components/LaunchWeek/Ticket/ticket-visual.module.css
+++ b/apps/www/components/LaunchWeek/Ticket/ticket-visual.module.css
@@ -26,7 +26,8 @@
background-color: #dea513;
border: 1px solid rgba(255, 255, 0, 0.629);
animation: svg-shadow 2s ease-in-out infinite alternate;
- background-image: url('/images/launchweek/gold-ticket-background.png');
+ background-image: url('/images/launchweek/seven/lw-7-bg.svg');
+ /* background-image: url('/images/launchweek/gold-ticket-background.png'); */
/* filter: drop-shadow(2.45223px 8.5828px 73.5669px #FFBD14); */
/* border-image-source: linear-gradient(to left, var(--gold-secondary), var(--gold-accent)); */
}
diff --git a/apps/www/components/LaunchWeek/Ticket/ticket-visual.tsx b/apps/www/components/LaunchWeek/Ticket/ticket-visual.tsx
index 1be2fca5301..223d7a0904a 100644
--- a/apps/www/components/LaunchWeek/Ticket/ticket-visual.tsx
+++ b/apps/www/components/LaunchWeek/Ticket/ticket-visual.tsx
@@ -1,5 +1,5 @@
import styles from './ticket-visual.module.css'
-import TicketProfile from './ticket-profile'
+import TicketProfile from './TicketProfile'
import TicketNumber from './ticket-number'
import TicketMono from './ticket-mono'
import TicketInfoFooter from './ticket-info-footer'
diff --git a/apps/www/components/LaunchWeek/Ticket/ticket.tsx b/apps/www/components/LaunchWeek/Ticket/ticket.tsx
index bbae5af07a7..1a2cf50ea94 100644
--- a/apps/www/components/LaunchWeek/Ticket/ticket.tsx
+++ b/apps/www/components/LaunchWeek/Ticket/ticket.tsx
@@ -6,9 +6,9 @@ import { useRef, useEffect, useState } from 'react'
// import { scrollTo } from '@lib/smooth-scroll'
import styles from './ticket.module.css'
import styleUtils from './utils.module.css'
-import TicketForm from './ticket-form'
+import TicketForm from './TicketForm'
import TicketVisual from './ticket-visual'
-import TicketActions from './ticket-actions'
+import TicketActions from './TicketActions'
import TicketCopy from './ticket-copy'
import { DATE, SITE_NAME } from '~/lib/constants'
import Form from './form'
@@ -123,66 +123,94 @@ export default function Ticket({
`}
>
<h1 className={cn(styleUtils.appear, styleUtils['appear-first'], 'text-xl xl:text-3xl')}>
- {name ? (
+ {!sharePage ? (
<>
- {winningChances === 1 && (
- <p className="text-2xl dark:text-scale-1200 tracking-[0.02rem]">
- You're <span className="gradient-text-purple-500">in the draw!</span> <br />
- Now make it gold.
- </p>
- )}
- {winningChances === 2 && (
- <p className="text-2xl dark:text-scale-1200 tracking-[0.02rem]">
- You've <span className="gradient-text-purple-500">doubled</span> your
- <br />
- chance! Almost gold.
- </p>
- )}
- {winningChances === 3 && (
+ {name ? (
+ <>
+ {winningChances === 1 && (
+ <p className="text-2xl dark:text-scale-1200 tracking-[0.02rem]">
+ You're <span className="gradient-text-purple-500">in the draw!</span> <br />
+ Now make it gold.
+ </p>
+ )}
+ {winningChances === 2 && (
+ <p className="text-2xl dark:text-scale-1200 tracking-[0.02rem]">
+ You've <span className="gradient-text-purple-500">doubled</span> your
+ <br />
+ chance! Almost gold.
+ </p>
+ )}
+ {winningChances === 3 && (
+ <p className="text-2xl dark:text-scale-1200 tracking-[0.02rem]">
+ You're <span className="gradient-text-gold-500">gold</span>!<br />
+ You've maxed your <br /> chances of winning!
+ </p>
+ )}
+ </>
+ ) : (
<p className="text-2xl dark:text-scale-1200 tracking-[0.02rem]">
- You're <span className="gradient-text-gold-500">gold</span>!<br />
- You've maxed your <br /> chances of winning!
+ Generate your ticket. <br />
+ Win the <span className="gradient-text-purple-500">SupaKeyboard</span>.
</p>
)}
</>
) : (
- <p className="text-2xl dark:text-scale-1200 tracking-[0.02rem]">
- Generate your ticket. <br />
- Win the <span className="gradient-text-purple-500">SupaKeyboard</span>.
- </p>
+ <>
+ {name ? name : username}'s <br />
+ unique ticket
+ </>
)}
</h1>
<h2 className="text-base max-w-[520px]">
- {golden ? (
+ {!sharePage ? (
<>
- <p>
- You got a Golden ticket. This means you’re in, and you also won a Supabase sticker
- pack!
- </p>
- </>
- ) : (
- <>
- {username ? (
+ {golden ? (
<>
<p>
- Why stop there? Increase your chances of winning by sharing your unique
- ticket. Get sharing!
+ You got a Golden ticket. This means you’re in, and you also won a Supabase
+ sticker pack!
</p>
</>
) : (
- <p>
- We have some fantastic swag up for grabs, including 3x limited edition
- mechanical keyboard that you won't want to miss.
- </p>
+ <>
+ {username ? (
+ <>
+ <p>
+ Why stop there? Increase your chances of winning by sharing your unique
+ ticket. Get sharing!
+ </p>
+ </>
+ ) : (
+ <p>
+ We have some fantastic swag up for grabs, including 3x limited edition
+ mechanical keyboard that you won't want to miss.
+ </p>
+ )}
+ </>
)}
</>
+ ) : (
+ <>
+ <p>
+ Get yours and win some fantastic swag, including a limited edition mechanical
+ keyboard that you won't want to miss.
+ </p>
+ </>
)}
</h2>
- {username && <ReferralIndicator />}
+
+ {!sharePage && username && <ReferralIndicator />}
</div>
<div className={cn(styleUtils.appear, styleUtils['appear-third'])}>
- {username && <TicketActions username={username} golden={golden} />}
+ {username && (
+ <TicketActions
+ username={username}
+ golden={golden}
+ ticketGenerationState={ticketGenerationState}
+ setTicketGenerationState={setTicketGenerationState}
+ />
+ )}
</div>
</div>
</div>
diff --git a/apps/www/hooks/useParams.ts b/apps/www/hooks/useParams.ts
new file mode 100644
index 00000000000..cac30143bd9
--- /dev/null
+++ b/apps/www/hooks/useParams.ts
@@ -0,0 +1,22 @@
+import { useRouter } from 'next/router'
+import { useMemo } from 'react'
+
+export function useParams(): {
+ [k: string]: string | undefined
+} {
+ const { query } = useRouter()
+
+ return useMemo(
+ () =>
+ Object.fromEntries(
+ Object.entries(query).map(([key, value]) => {
+ if (Array.isArray(value)) {
+ return [key, value[0]]
+ } else {
+ return [key, value]
+ }
+ })
+ ),
+ [query]
+ )
+}
diff --git a/apps/www/pages/launch-week/index.tsx b/apps/www/pages/launch-week/index.tsx
index 570e4b9d545..09cb1c5c9ea 100644
--- a/apps/www/pages/launch-week/index.tsx
+++ b/apps/www/pages/launch-week/index.tsx
@@ -7,11 +7,10 @@ import { useRouter } from 'next/router'
import { createClient, Session, SupabaseClient } from '@supabase/supabase-js'
import { useState, useEffect } from 'react'
import { IconArrowDown, useTheme } from 'ui'
-import classNames from 'classnames'
-import styles from './launchWeek.module.css'
-import styleUtils from '~/components/LaunchWeek/Ticket/utils.module.css'
-import Image from 'next/image'
import LabelBadge from '~/components/LaunchWeek/LabelBadge'
+import launchweek from './6'
+import LaunchWeekPrizeSection from '~/components/LaunchWeek/LaunchSection/LaunchWeekPrizeSection'
+import { LaunchWeekLogoHeader } from '~/components/LaunchWeek/LaunchSection/LaunchWeekLogoHeader'
export default function TicketHome() {
const { isDarkMode } = useTheme()
@@ -74,27 +73,10 @@ export default function TicketHome() {
}}
/>
<DefaultLayout>
- <div className={`${styles['bg-lw7']} -mt-16 pt-12`}>
+ <div className="bg-lw7 -mt-16 pt-12">
<SectionContainer className="flex flex-col !pb-1 items-center lg:pt-32 gap-24">
- <div className="flex flex-col gap-3 items-center justify-center xl:justify-start">
- <div
- className={classNames(
- styleUtils.appear,
- styleUtils['appear-first'],
- 'flex flex-col justify-center gap-3'
- )}
- >
- <h1 className="flex gap-[24px] justify-center font-normal uppercase text-[32px] items-center">
- <span className="tracking-[4px] text-white">Launch week</span>
- <span className="flex justify-center">
- <Image src="/images/launchweek/seven/lw7-seven.svg" width={40} height={40} />
- </span>
- </h1>
- <p className="text-white text-sm text-center">
- April 3rd – 7th at 6 AM PT | 9 AM ET
- </p>
- </div>
- </div>
+ <LaunchWeekLogoHeader />
+
{supabase && (
<TicketContainer
supabase={supabase}
@@ -103,6 +85,7 @@ export default function TicketHome() {
defaultPageState="ticket"
/>
)}
+
<div>
<a href="#lw-7-prizes" className="flex items-center text-white text-sm gap-4">
More about the prizes <IconArrowDown w={10} h={12} />
@@ -110,98 +93,7 @@ export default function TicketHome() {
</div>
</SectionContainer>
- <div className="mt-24 relative h-[640px] overflow-hidden">
- <div className="-ml-[24rem] -mr-[24rem]">
- <Image src="/images/launchweek/seven/lw-7-bg.svg" layout="fill" objectFit="cover" />
- </div>
- </div>
-
- <div className="text-center -mt-56 relative z-10 text-white">
- <div className="max-w-[38rem] mx-auto">
- <Image src="/images/launchweek/seven/lw7-seven.svg" width={40} height={40} />
- <h2 className="text-4xl mt-2">
- Get your <span className="gradient-text-purple-500">winning ticket</span>
- </h2>
- <p className="mt-4 radial-gradient-text-scale-500" id="lw-7-prizes">
- Mark your calendars for April 9th and join us on Discord for Launch Week 7's final
- day to find out if you're one of the lucky winners. Get sharing!
- </p>
- </div>
- <div className={classNames(styles['bg-lw7-black-transition'], 'h-24 ')}></div>
- </div>
- <div className="bg-black text-white">
- <div className="flex gap-4 max-w-7xl mx-auto mb-8">
- <div className=" w-3/5">
- <div className="grid gap-4 border border-[#484848] rounded-tr-xl rounded-tl-xl overflow-hidden">
- <div className="relative h-[360px]">
- <Image
- src="/images/launchweek/seven/keyboard.png"
- layout="fill"
- objectFit="cover"
- />
- </div>
- <div className="p-6 mt-3">
- <h3 className="gradient-text-purple-500 font-mono uppercase font-medium">
- Main award
- </h3>
- <h4 className="flex items-center gap-3 text-[19px] mt-4">
- <Image
- src="/images/launchweek/seven/icons/compute-upgrade.svg"
- width={16}
- height={16}
- />
- Supabase Mechanical Keyboard <LabelBadge text="5 pieces" />
- </h4>
- <p className="text-scale-1100 mt-1">
- Increase your chances of winning limited edition 62-Key ISO Custom Mechanical
- Keyboard by sharing your ticket on Twitter.
- </p>
- </div>
- </div>
- </div>
-
- <div className="grid gap-4 w-2/5">
- <div className="grid relative border border-[#484848] rounded-2xl overflow-hidden">
- <Image
- src="/images/launchweek/seven/lw-7-bg.svg"
- layout="fill"
- objectFit="cover"
- />
- <div className="absolute inset-0 bg-gradient-to-t from-black bg-opacity-50 flex ">
- <h3 className="mt-auto mb-4 mx-6 text-lg flex items-center gap-4">
- Limited edition sticker pack <LabelBadge text="20 packs" />
- </h3>
- </div>
- </div>
- <div className="flex gap-4">
- <div className="grid relative border border-[#484848] rounded-2xl overflow-hidden w-1/2">
- <Image
- src="/images/launchweek/seven/lw-7-bg.svg"
- layout="fill"
- objectFit="cover"
- />
- <div className="absolute inset-0 bg-gradient-to-t from-black bg-opacity-50 flex ">
- <h3 className="mt-auto mb-4 mx-6 text-lg flex items-center gap-4">
- Supa T-shirt <LabelBadge text="10 shirts" />
- </h3>
- </div>
- </div>
- <div className="grid relative border border-[#484848] rounded-2xl overflow-hidden w-1/2">
- <Image
- src="/images/launchweek/seven/lw-7-bg.svg"
- layout="fill"
- objectFit="cover"
- />
- <div className="absolute inset-0 bg-gradient-to-t from-black bg-opacity-50 flex ">
- <h3 className="mt-auto mb-4 mx-6 text-lg flex items-center gap-4">
- Supa socks <LabelBadge text="10 pairs" />
- </h3>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
+ <LaunchWeekPrizeSection />
</div>
</DefaultLayout>
</>
diff --git a/apps/www/pages/launch-week/launchWeek.module.css b/apps/www/pages/launch-week/launchWeek.css
similarity index 100%
rename from apps/www/pages/launch-week/launchWeek.module.css
rename to apps/www/pages/launch-week/launchWeek.css
diff --git a/apps/www/pages/launch-week/tickets/[username].tsx b/apps/www/pages/launch-week/tickets/[username].tsx
index fcdccdb0c3f..b6590b84d0e 100644
--- a/apps/www/pages/launch-week/tickets/[username].tsx
+++ b/apps/www/pages/launch-week/tickets/[username].tsx
@@ -9,6 +9,8 @@ import { createClient } from '@supabase/supabase-js'
import { useEffect, useState } from 'react'
import { FastGlobOptionsWithoutCwd } from 'globby'
import { useTheme } from 'common/Providers'
+import LaunchWeekPrizeSection from '~/components/LaunchWeek/LaunchSection/LaunchWeekPrizeSection'
+import { LaunchWeekLogoHeader } from '~/components/LaunchWeek/LaunchSection/LaunchWeekLogoHeader'
type Props = {
username: string | null
@@ -60,28 +62,24 @@ export default function TicketShare({ username, ticketNumber, name, golden, refe
}}
/>
<DefaultLayout>
- <SectionContainer className="flex flex-col gap-8 pb-0 md:gap-16 lg:gap-16 items-center xl:items-start">
- <img
- src="/images/launchweek/launchweek-logo--light.svg"
- className="md:40 w-40 dark:hidden lg:w-80"
- />
- <img
- src="/images/launchweek/launchweek-logo--dark.svg"
- className="md:40 hidden w-40 dark:block lg:w-80"
- />
- <TicketContainer
- supabase={supabase}
- session={null}
- defaultUserData={{
- username: username || undefined,
- name: name || '',
- ticketNumber,
- golden,
- referrals,
- }}
- sharePage
- />
- </SectionContainer>
+ <div className="bg-lw7 -mt-16 pt-12">
+ <SectionContainer className="flex flex-col !pb-1 items-center lg:pt-32 gap-24">
+ <LaunchWeekLogoHeader />
+ <TicketContainer
+ supabase={supabase}
+ session={null}
+ defaultUserData={{
+ username: username || undefined,
+ name: name || '',
+ ticketNumber,
+ golden,
+ referrals,
+ }}
+ sharePage
+ />
+ </SectionContainer>
+ <LaunchWeekPrizeSection />
+ </div>
</DefaultLayout>
</>
)
diff --git a/apps/www/styles/index.css b/apps/www/styles/index.css
index 4a6a4c6f379..214684a9549 100644
--- a/apps/www/styles/index.css
+++ b/apps/www/styles/index.css
@@ -2,6 +2,8 @@
@tailwind components;
@tailwind utilities;
+@import url(../pages/launch-week/launchWeek.css);
+
@font-face {
font-family: 'custom-font';
src: url(../../../packages/common/assets/fonts/CustomFont-Book.woff2) format('woff2'),