The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
LW8: Pre Launch ticketing system
Francesco Sansalvadore7f237910add6
diff --git a/apps/docs/layouts/SiteLayout.tsx b/apps/docs/layouts/SiteLayout.tsxindex b24019de139..59bead2a64d 100644--- a/apps/docs/layouts/SiteLayout.tsx+++ b/apps/docs/layouts/SiteLayout.tsx@@ -8,6 +8,7 @@ import Head from 'next/head'import { PropsWithChildren, memo } from 'react'import Footer from '~/components/Navigation/Footer'import { menuState, useMenuLevelId, useMenuMobileOpen } from '~/hooks/useMenuState'+import { Announcement, LW8CountdownBanner } from 'ui'const levelsData = {home: {@@ -326,6 +327,9 @@ const SiteLayout = ({ children }: PropsWithChildren<{}>) => {<title>Supabase Docs</title></Head><main>+ <Announcement>+ <LW8CountdownBanner />+ </Announcement><div className="flex flex-row h-screen"><NavContainer /><Container>diff --git a/apps/www/_blog/2023-04-07-designing-with-ai-midjourney.mdx b/apps/www/_blog/2023-04-07-designing-with-ai-midjourney.mdxindex 07f29e5190f..d15b4143e63 100644--- a/apps/www/_blog/2023-04-07-designing-with-ai-midjourney.mdx+++ b/apps/www/_blog/2023-04-07-designing-with-ai-midjourney.mdx@@ -57,7 +57,7 @@ And voila, we had a baseline for generating variations:The final visual that you see everywhere won us over because of its vibrant swirls. While each swirl looks slightly different, a consistent style is still maintained throughout.-Fortunately, we didn't require full-width images for each ticket. Upscaled MidJourney images sufficed. Nevertheless, we had to recreate the main visual on the landing page in vectors to use it effectively. You can view it in full glory at [https://supabase.com/launch-week](https://supabase.com/launch-week).+Fortunately, we didn't require full-width images for each ticket. Upscaled MidJourney images sufficed. Nevertheless, we had to recreate the main visual on the landing page in vectors to use it effectively. You can view it in full glory at [https://supabase.com/launch-week/7](https://supabase.com/launch-week/7).@@ -258,13 +258,13 @@ const channel = supabase.subscribe()```-Interested to know how this fits within your Next.js application? Find the code [here](https://github.com/supabase/supabase/blob/master/apps/www/components/LaunchWeek/Ticket/TicketForm.tsx#L70-L102).+Interested to know how this fits within your Next.js application? Find the code [here](https://github.com/supabase/supabase/blob/master/apps/www/components/LaunchWeek/7/Ticket/TicketForm.tsx#L70-L102).## Displaying the images-We have some images, so how can we now display them somewhere? [@Francesco Sansalvadore](https://twitter.com/frnk_snslvdr) saw one of our team members trying to “swipe” on the tickets slider component on the [launch week page](https://supabase.com/launch-week/tickets) and he thought, why not feature all the fantastic people who generated tickets on a single page?+We have some images, so how can we now display them somewhere? [@Francesco Sansalvadore](https://twitter.com/frnk_snslvdr) saw one of our team members trying to “swipe” on the tickets slider component on the [launch week page](https://supabase.com/launch-week/7/tickets) and he thought, why not feature all the fantastic people who generated tickets on a single page?-We built a [ticket wall](https://supabase.com/launch-week/tickets) that you can scroll endlessly. We approached it with an infinite scroll technique, lazy-loading a few tickets at a time.+We built a [ticket wall](https://supabase.com/launch-week/7/tickets) that you can scroll endlessly. We approached it with an infinite scroll technique, lazy-loading a few tickets at a time.diff --git a/apps/www/components/CTABanner/index.tsx b/apps/www/components/CTABanner/index.tsxindex fb08eb5630e..ff1f2ddec1a 100644--- a/apps/www/components/CTABanner/index.tsx+++ b/apps/www/components/CTABanner/index.tsx@@ -1,18 +1,26 @@import { Button } from 'ui'-const CTABanner = (props: any) => {- const { darkerBg } = props+interface Props {+ className?: string+ darkerBg?: boolean+}++const CTABanner = ({ darkerBg, className }: Props) => {return (<div- className={`- bg-scale-200 grid grid-cols-12 items-center gap-4 border-t py-32 text-center- ${darkerBg ? 'dark:bg-dark-900' : ''} px-16- `}+ className={[+ `bg-scale-200 grid grid-cols-12 items-center gap-4 border-t py-32 text-center px-16`,+ darkerBg && 'dark:bg-dark-900',+ className,+ ].join(' ')}><div className="col-span-12"><h2 className="h2"><span className="text-scale-900">Build in a weekend,</span>- <span className="text-scale-1200 dark:text-white"> scale to millions</span>+ <span className="text-scale-1200 dark:text-white block sm:inline">+ {' '}+ scale to millions+ </span></h2></div><div className="col-span-12 mt-4">diff --git a/apps/www/components/DarkModeToggle.tsx b/apps/www/components/DarkModeToggle.tsxindex 4b3b03cc7aa..f8c9ad1abff 100644--- a/apps/www/components/DarkModeToggle.tsx+++ b/apps/www/components/DarkModeToggle.tsx@@ -1,20 +1,21 @@import { useTheme } from 'common/Providers'import { IconSun, IconMoon } from 'ui'-function DarkModeToggle() {+function DarkModeToggle({ disabled = false }: { disabled?: boolean }) {const { isDarkMode, toggleTheme } = useTheme()return (- <div className="flex items-center">+ <div className={`flex items-center ${disabled && 'opacity-30'}`}><IconSun className="text-scale-900" strokeWidth={2} /><buttontype="button"aria-pressed="false"+ disabled={disabled}className={`relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparenttransition-colors duration-200 ease-in-out focus:outline-none ${isDarkMode ? 'bg-scale-500' : 'bg-scale-900'- } mx-5+ } ${disabled && '!cursor-not-allowed'} mx-5`}onClick={() => toggleTheme()}>diff --git a/apps/www/components/Footer/index.tsx b/apps/www/components/Footer/index.tsxindex 2f3b4aaf54b..5dd0307226f 100644--- a/apps/www/components/Footer/index.tsx+++ b/apps/www/components/Footer/index.tsx@@ -17,7 +17,7 @@ interface Props {const Footer = (props: Props) => {const { isDarkMode } = useTheme()const { pathname } = useRouter()- const isLaunchWeekPage = pathname.includes('launch-week')+ const isLaunchWeekPage = pathname.includes('launch-week') || pathname === '/'return (<footer@@ -149,7 +149,7 @@ const Footer = (props: Props) => {</div><div className="border-scale-500 dark:border-scale-600 mt-32 flex justify-between border-t pt-8"><small className="small">© Supabase Inc</small>- <DarkModeToggle />+ <DarkModeToggle disabled={isLaunchWeekPage} /></div></SectionContainer></footer>diff --git a/apps/www/components/Hero/Hero.tsx b/apps/www/components/Hero/Hero.tsxindex a309e4087f1..3b50464f47d 100644--- a/apps/www/components/Hero/Hero.tsx+++ b/apps/www/components/Hero/Hero.tsx@@ -3,31 +3,59 @@ import { useRouter } from 'next/router'import Telemetry, { TelemetryEvent } from '~/lib/telemetry'import { useTelemetryProps } from 'common/hooks/useTelemetryProps'import gaEvents from '~/lib/gaEvents'-import { Button, IconBookOpen } from 'ui'+import { Badge, Button, IconArrowRight, IconBookOpen } from 'ui'import SectionContainer from '~/components/Layouts/SectionContainer'import HeroFrameworks from './HeroFrameworks'import styles from './hero.module.css'+import Image from 'next/image'+import { range } from 'lodash'+import ParticlesCanvas from '../LaunchWeek/8/AnimatedParticles/ParticlesCanvas'+import { useBreakpoint } from 'common'+import { useEffect, useState } from 'react'const Hero = () => {const router = useRouter()+ const [showAnnouncement, setShowAnnouncement] = useState(false)const telemetryProps = useTelemetryProps()+ const isMobile = useBreakpoint()const sendTelemetryEvent = async (event: TelemetryEvent) => {await Telemetry.sendEvent(event, telemetryProps, router)}+ useEffect(() => {+ if (typeof window !== undefined) {+ const lw8AnnouncementKey = window.localStorage.getItem('announcement_SupabaseLaunchWeek8')+ setShowAnnouncement(!!lw8AnnouncementKey)+ }+ }, [showAnnouncement])+return (- <div className="relative">+ <div className="relative -mt-[65px]"><SectionContainer className="py-12 md:py-16 lg:py-20"><div className="relative"><div className="mx-auto"><div className="mx-auto max-w-2xl lg:col-span-6 lg:flex lg:items-center justify-center text-center"><divclassName={[- 'appear-first lg:h-[50vh] lg:min-h-[300px] lg:max-h-[450px] flex flex-col items-center justify-center sm:mx-auto md:w-3/4 lg:mx-0 lg:w-full gap-4 lg:gap-8',+ 'relative z-10 appear-first lg:h-auto pt-[250px] lg:pt-[250px] lg:min-h-[300px] flex flex-col items-center justify-center sm:mx-auto md:w-3/4 lg:mx-0 lg:w-full gap-4 lg:gap-8',styles['hero-text'],].join(' ')}>- <div>+ <div className="flex flex-col items-center">+ {showAnnouncement && (+ <Link href="/launch-week">+ <a className="group w-auto rounded-full p-1 mb-6 mt-8 md:mb-10 bg-gradient-to-b from-[#1b1f2124] to-[#02040550] hover:from-[#ffffff15] hover:to-[#ffffff05] transition-all backdrop-blur-lg border flex items-center justify-between gap-2 md:gap-4 text-scale-1100 hover:text-scale-1200 text-sm">+ <div className="text-scale-200 rounded-full bg-brand-900 px-3 py-1 flex items-center justify-center">+ Get you ticket+ </div>+ <span>Launch Week 8 - August 7th</span>+ <IconArrowRight+ size={16}+ className="transform mr-2 transition-transform translate-x-0 sm:-translate-x-1 group-hover:translate-x-0"+ />+ </a>+ </Link>+ )}<h1 className="text-scale-1200 text-4xl sm:text-5xl sm:leading-none lg:text-7xl"><span className="block text-[#F4FFFA00] bg-clip-text bg-gradient-to-b from-scale-1200 to-scale-1200 dark:to-scale-1100">Build in a weekend@@ -63,12 +91,35 @@ const Hero = () => {</a></Link></div>+<HeroFrameworks className="mt-4 lg:mt-6" /></div></div></div></div>+ <div className="absolute -top-2 md:top-0 -left-10 -right-10 md:left-0 md:right-0 h-[500px] lg:h-[550px] z-0">+ <ParticlesCanvas users={range(0, 60)} />+ <Image+ src="/images/launchweek/8/stars.svg"+ alt="starts background"+ layout="fill"+ objectFit="cover"+ className="opacity-70"+ draggable={false}+ />+ </div></SectionContainer>+ <div className="absolute w-full aspect-[1/1] md:aspect-[1.5/1] lg:aspect-[2.5/1] inset-0 z-0">+ <Image+ src="/images/launchweek/8/LW8-gradient.png"+ layout="fill"+ objectFit={isMobile ? 'cover' : 'contain'}+ objectPosition="top"+ priority+ draggable={false}+ />+ </div>+ <div className="absolute top-0 left-0 right-0 h-screen bg-gradient-to-b from-[#020405] to-transparent -z-10" /><div className="w-1/2 container mx-auto h-px bg-gradient-to-r from-transparent via-scale-600 to-transparent" /></div>)diff --git a/apps/www/components/LaunchWeek/ScheduleInfo.tsx b/apps/www/components/LaunchWeek/5/ScheduleInfo.tsxsimilarity index 100%rename from apps/www/components/LaunchWeek/ScheduleInfo.tsxrename to apps/www/components/LaunchWeek/5/ScheduleInfo.tsxdiff --git a/apps/www/components/LaunchWeek/days.json b/apps/www/components/LaunchWeek/5/days.jsonsimilarity index 100%rename from apps/www/components/LaunchWeek/days.jsonrename to apps/www/components/LaunchWeek/5/days.jsondiff --git a/apps/www/components/LaunchWeek/HackathonSection.tsx b/apps/www/components/LaunchWeek/6/HackathonSection.tsxsimilarity index 100%rename from apps/www/components/LaunchWeek/HackathonSection.tsxrename to apps/www/components/LaunchWeek/6/HackathonSection.tsxdiff --git a/apps/www/components/LaunchWeek/LaunchHero.tsx b/apps/www/components/LaunchWeek/6/LaunchHero.tsxsimilarity index 100%rename from apps/www/components/LaunchWeek/LaunchHero.tsxrename to apps/www/components/LaunchWeek/6/LaunchHero.tsxdiff --git a/apps/www/components/LaunchWeek/PreLaunchTeaser.tsx b/apps/www/components/LaunchWeek/6/PreLaunchTeaser.tsxsimilarity index 100%rename from apps/www/components/LaunchWeek/PreLaunchTeaser.tsxrename to apps/www/components/LaunchWeek/6/PreLaunchTeaser.tsxdiff --git a/apps/www/components/LaunchWeek/launch-controller.json b/apps/www/components/LaunchWeek/6/launch-controller.jsonsimilarity index 100%rename from apps/www/components/LaunchWeek/launch-controller.jsonrename to apps/www/components/LaunchWeek/6/launch-controller.jsondiff --git a/apps/www/components/LaunchWeek/lw6_days.json b/apps/www/components/LaunchWeek/6/lw6_days.jsonsimilarity index 100%rename from apps/www/components/LaunchWeek/lw6_days.jsonrename to apps/www/components/LaunchWeek/6/lw6_days.jsondiff --git a/apps/www/components/LaunchWeek/7/BlogLinks.tsx b/apps/www/components/LaunchWeek/7/BlogLinks.tsxindex 41168f03550..6ccf0de19ca 100644--- a/apps/www/components/LaunchWeek/7/BlogLinks.tsx+++ b/apps/www/components/LaunchWeek/7/BlogLinks.tsx@@ -2,7 +2,7 @@ import { motion } from 'framer-motion'import Image from 'next/image'import Link from 'next/link'import React from 'react'-import days from '~/components/LaunchWeek/lw7_days'+import days from '~/components/LaunchWeek/7/lw7_days'const BlogLinks = () => {const activeDays = days.filter((day) => Date.parse(day.publishedAt) <= Date.now())diff --git a/apps/www/components/LaunchWeek/LW7BgGraphic.tsx b/apps/www/components/LaunchWeek/7/LW7BgGraphic.tsxsimilarity index 100%rename from apps/www/components/LaunchWeek/LW7BgGraphic.tsxrename to apps/www/components/LaunchWeek/7/LW7BgGraphic.tsxdiff --git a/apps/www/components/LaunchWeek/LabelBadge.tsx b/apps/www/components/LaunchWeek/7/LabelBadge.tsxsimilarity index 100%rename from apps/www/components/LaunchWeek/LabelBadge.tsxrename to apps/www/components/LaunchWeek/7/LabelBadge.tsxdiff --git a/apps/www/components/LaunchWeek/LaunchSection/Announcement.tsx b/apps/www/components/LaunchWeek/7/LaunchSection/Announcement.tsxsimilarity index 94%rename from apps/www/components/LaunchWeek/LaunchSection/Announcement.tsxrename to apps/www/components/LaunchWeek/7/LaunchSection/Announcement.tsxindex 73805f6de09..5f8f4db18a9 100644--- a/apps/www/components/LaunchWeek/LaunchSection/Announcement.tsx+++ b/apps/www/components/LaunchWeek/7/LaunchSection/Announcement.tsx@@ -1,4 +1,4 @@-import { Announcement as AnnouncementType } from '../types'+import { Announcement as AnnouncementType } from '../../types'export const Announcement = (props: AnnouncementType) => {const containerClasses = []diff --git a/apps/www/components/LaunchWeek/LaunchSection/ArticleButton.tsx b/apps/www/components/LaunchWeek/7/LaunchSection/ArticleButton.tsxsimilarity index 95%rename from apps/www/components/LaunchWeek/LaunchSection/ArticleButton.tsxrename to apps/www/components/LaunchWeek/7/LaunchSection/ArticleButton.tsxindex 10826a772f0..364e9ccd5eb 100644--- a/apps/www/components/LaunchWeek/LaunchSection/ArticleButton.tsx+++ b/apps/www/components/LaunchWeek/7/LaunchSection/ArticleButton.tsx@@ -1,5 +1,5 @@import { NewspaperIcon } from '@heroicons/react/outline'-import { Article } from '../types'+import { Article } from '../../types'const ArticleButton = (props: Article) => {return (diff --git a/apps/www/components/LaunchWeek/LaunchSection/ArticleButtonListItem.tsx b/apps/www/components/LaunchWeek/7/LaunchSection/ArticleButtonListItem.tsxsimilarity index 94%rename from apps/www/components/LaunchWeek/LaunchSection/ArticleButtonListItem.tsxrename to apps/www/components/LaunchWeek/7/LaunchSection/ArticleButtonListItem.tsxindex be927a23cd2..e374bd023fc 100644--- a/apps/www/components/LaunchWeek/LaunchSection/ArticleButtonListItem.tsx+++ b/apps/www/components/LaunchWeek/7/LaunchSection/ArticleButtonListItem.tsx@@ -1,6 +1,6 @@import { NewspaperIcon } from '@heroicons/react/outline'import Link from 'next/link'-import { Article } from '../types'+import { Article } from '../../types'const ArticleButtonListItem = (props: Article) => {return (diff --git a/apps/www/components/LaunchWeek/LaunchSection/LaunchWeekLogoHeader.tsx b/apps/www/components/LaunchWeek/7/LaunchSection/LaunchWeekLogoHeader.tsxsimilarity index 100%rename from apps/www/components/LaunchWeek/LaunchSection/LaunchWeekLogoHeader.tsxrename to apps/www/components/LaunchWeek/7/LaunchSection/LaunchWeekLogoHeader.tsxdiff --git a/apps/www/components/LaunchWeek/LaunchSection/ProductButton.tsx b/apps/www/components/LaunchWeek/7/LaunchSection/ProductButton.tsxsimilarity index 95%rename from apps/www/components/LaunchWeek/LaunchSection/ProductButton.tsxrename to apps/www/components/LaunchWeek/7/LaunchSection/ProductButton.tsxindex c1b89239015..550d0e28815 100644--- a/apps/www/components/LaunchWeek/LaunchSection/ProductButton.tsx+++ b/apps/www/components/LaunchWeek/7/LaunchSection/ProductButton.tsx@@ -1,5 +1,5 @@import { SparklesIcon } from '@heroicons/react/outline'-import { Article } from '../types'+import { Article } from '../../types'const ProductButton = (props: Article) => {return (diff --git a/apps/www/components/LaunchWeek/LaunchSection/ProductButtonListItem.tsx b/apps/www/components/LaunchWeek/7/LaunchSection/ProductButtonListItem.tsxsimilarity index 95%rename from apps/www/components/LaunchWeek/LaunchSection/ProductButtonListItem.tsxrename to apps/www/components/LaunchWeek/7/LaunchSection/ProductButtonListItem.tsxindex bb8edfb1af4..07ed656ae0c 100644--- a/apps/www/components/LaunchWeek/LaunchSection/ProductButtonListItem.tsx+++ b/apps/www/components/LaunchWeek/7/LaunchSection/ProductButtonListItem.tsx@@ -1,6 +1,6 @@import { SparklesIcon } from '@heroicons/react/outline'import Link from 'next/link'-import { Article } from '../types'+import { Article } from '../../types'export const ProductButtonListItem = (props: Article) => {return (diff --git a/apps/www/components/LaunchWeek/LaunchSection/TicketBrick.tsx b/apps/www/components/LaunchWeek/7/LaunchSection/TicketBrick.tsxsimilarity index 96%rename from apps/www/components/LaunchWeek/LaunchSection/TicketBrick.tsxrename to apps/www/components/LaunchWeek/7/LaunchSection/TicketBrick.tsxindex 50e0438868d..5f393f57650 100644--- a/apps/www/components/LaunchWeek/LaunchSection/TicketBrick.tsx+++ b/apps/www/components/LaunchWeek/7/LaunchSection/TicketBrick.tsx@@ -1,7 +1,7 @@import React, { useState } from 'react'import TicketHeader from '../Ticket/TicketHeader'import TicketNumber from '../Ticket/TicketNumber'-import { UserData } from '../Ticket/hooks/use-conf-data'+import { UserData } from '~/components/LaunchWeek/hooks/use-conf-data'import Image from 'next/image'interface Props {diff --git a/apps/www/components/LaunchWeek/LaunchSection/TicketBrickWall.tsx b/apps/www/components/LaunchWeek/7/LaunchSection/TicketBrickWall.tsxsimilarity index 96%rename from apps/www/components/LaunchWeek/LaunchSection/TicketBrickWall.tsxrename to apps/www/components/LaunchWeek/7/LaunchSection/TicketBrickWall.tsxindex b757f4cdeaf..ea7922d61f4 100644--- a/apps/www/components/LaunchWeek/LaunchSection/TicketBrickWall.tsx+++ b/apps/www/components/LaunchWeek/7/LaunchSection/TicketBrickWall.tsx@@ -2,7 +2,7 @@ import Link from 'next/link'import React from 'react'import { Button } from 'ui'import { useBreakpoint } from 'common/hooks/useBreakpoint'-import { UserData } from '../Ticket/hooks/use-conf-data'+import { UserData } from '~/components/LaunchWeek/hooks/use-conf-data'import { TicketBrickWallSlider } from './TicketBrickWallSlider'type user = UserDatadiff --git a/apps/www/components/LaunchWeek/LaunchSection/TicketBrickWallSlider.tsx b/apps/www/components/LaunchWeek/7/LaunchSection/TicketBrickWallSlider.tsxsimilarity index 92%rename from apps/www/components/LaunchWeek/LaunchSection/TicketBrickWallSlider.tsxrename to apps/www/components/LaunchWeek/7/LaunchSection/TicketBrickWallSlider.tsxindex 8ff947547f9..ebc7a12ffb9 100644--- a/apps/www/components/LaunchWeek/LaunchSection/TicketBrickWallSlider.tsx+++ b/apps/www/components/LaunchWeek/7/LaunchSection/TicketBrickWallSlider.tsx@@ -1,7 +1,7 @@import { useEffect, useRef, useState } from 'react'import Image from 'next/image'import Link from 'next/link'-import { UserData } from '../Ticket/hooks/use-conf-data'+import { UserData } from '~/components/LaunchWeek/hooks/use-conf-data'import { useWindowSize } from 'react-use'import { Swiper, SwiperSlide } from 'swiper/react'@@ -34,7 +34,7 @@ export function TicketBrickWallSlider({ users, reverse, speed = 10000 }: Props)return (<div ref={ref} className="relative h-auto w-full m-0 overflow-hidden mb-2.5">- <div className="flex swiper-transition-linear">+ <div className="flex swiper-transition-linear ticket-brick-swiper"><SwiperonSwiper={(swiper) => setSwiperInstance(swiper)}centeredSlides={true}@@ -65,7 +65,7 @@ export function TicketBrickWallSlider({ users, reverse, speed = 10000 }: Props)>{users.map((user, i) => (<SwiperSlide key={user.username}>- <Link href={`/launch-week/tickets/${user.username}`} key={user.username}>+ <Link href={`/launch-week/7/tickets/${user.username}`} key={user.username}><a className="relative !w-[230px] md:w-[450px] !h-[200px] rounded-md md:rounded-lg transition-transform"><div className="relative w-full pt-[50%] transform rounded-md md:rounded-lg overflow-hidden bg-gradient-to-b from-[#ffffff60] to-[#ffffff10]"><div className="absolute inset-[1px] w-full h-full rounded-md md:rounded-lg overflow-hidden p-[1px]">diff --git a/apps/www/components/LaunchWeek/LaunchSection/brick-wall.module.css b/apps/www/components/LaunchWeek/7/LaunchSection/brick-wall.module.csssimilarity index 100%rename from apps/www/components/LaunchWeek/LaunchSection/brick-wall.module.cssrename to apps/www/components/LaunchWeek/7/LaunchSection/brick-wall.module.cssdiff --git a/apps/www/components/LaunchWeek/LaunchSection/index.tsx b/apps/www/components/LaunchWeek/7/LaunchSection/index.tsxsimilarity index 99%rename from apps/www/components/LaunchWeek/LaunchSection/index.tsxrename to apps/www/components/LaunchWeek/7/LaunchSection/index.tsxindex f48efa21534..3faf36f20d0 100644--- a/apps/www/components/LaunchWeek/LaunchSection/index.tsx+++ b/apps/www/components/LaunchWeek/7/LaunchSection/index.tsx@@ -3,7 +3,7 @@ import { useState } from 'react'import { PlayIcon, TruckIcon, XIcon } from '@heroicons/react/outline'import { Badge, Modal } from 'ui'-import { Article, Product, WeekDayProps } from '../types'+import { Article, Product, WeekDayProps } from '../../types'import _days from './../days.json'import ArticleButtonListItem from './ArticleButtonListItem'import ProductButtonListItem from './ProductButtonListItem'diff --git a/apps/www/components/LaunchWeek/LaunchSection/ticket-brick-wall-slider.module.css b/apps/www/components/LaunchWeek/7/LaunchSection/ticket-brick-wall-slider.module.csssimilarity index 100%rename from apps/www/components/LaunchWeek/LaunchSection/ticket-brick-wall-slider.module.cssrename to apps/www/components/LaunchWeek/7/LaunchSection/ticket-brick-wall-slider.module.cssdiff --git a/apps/www/components/LaunchWeek/LaunchSection/LaunchWeekPrizeCard.tsx b/apps/www/components/LaunchWeek/7/LaunchWeekPrizeCard.tsxsimilarity index 100%rename from apps/www/components/LaunchWeek/LaunchSection/LaunchWeekPrizeCard.tsxrename to apps/www/components/LaunchWeek/7/LaunchWeekPrizeCard.tsxdiff --git a/apps/www/components/LaunchWeek/LaunchSection/LaunchWeekPrizeSection.tsx b/apps/www/components/LaunchWeek/7/LaunchWeekPrizeSection.tsxsimilarity index 99%rename from apps/www/components/LaunchWeek/LaunchSection/LaunchWeekPrizeSection.tsxrename to apps/www/components/LaunchWeek/7/LaunchWeekPrizeSection.tsxindex 052d6c44479..4f8d365192b 100644--- a/apps/www/components/LaunchWeek/LaunchSection/LaunchWeekPrizeSection.tsx+++ b/apps/www/components/LaunchWeek/7/LaunchWeekPrizeSection.tsx@@ -1,5 +1,5 @@import React from 'react'-import LabelBadge from '../LabelBadge'+import LabelBadge from './LabelBadge'import LaunchWeekPrizeCard from './LaunchWeekPrizeCard'import { motion } from 'framer-motion'diff --git a/apps/www/components/LaunchWeek/ReferralIndicator.tsx b/apps/www/components/LaunchWeek/7/ReferralIndicator.tsxsimilarity index 82%rename from apps/www/components/LaunchWeek/ReferralIndicator.tsxrename to apps/www/components/LaunchWeek/7/ReferralIndicator.tsxindex fd3a7f4c3fd..c4ad96a0871 100644--- a/apps/www/components/LaunchWeek/ReferralIndicator.tsx+++ b/apps/www/components/LaunchWeek/7/ReferralIndicator.tsx@@ -1,6 +1,6 @@import React from 'react'-import useConfData from '~/components/LaunchWeek/Ticket//hooks/use-conf-data'-import useWinningChances from './Ticket/hooks/useWinningChances'+import useConfData from '~/components/LaunchWeek/hooks/use-conf-data'+import useWinningChances from '../hooks/useWinningChances'export default function ReferralIndicator() {const winningChances = useWinningChances()diff --git a/apps/www/components/LaunchWeek/Releases/LW7/Day5.tsx b/apps/www/components/LaunchWeek/7/Releases/Day5.tsxsimilarity index 99%rename from apps/www/components/LaunchWeek/Releases/LW7/Day5.tsxrename to apps/www/components/LaunchWeek/7/Releases/Day5.tsxindex b36d06f1c32..01371b11a04 100644--- a/apps/www/components/LaunchWeek/Releases/LW7/Day5.tsx+++ b/apps/www/components/LaunchWeek/7/Releases/Day5.tsx@@ -11,8 +11,8 @@ import {StyledArticleBadge,} from './components'-import { WeekDayProps } from '~/components/LaunchWeek/lw7_days'-import { opacityVariant4, scaleOpacityVariant2 } from './LW7Releases'+import { WeekDayProps } from '~/components/LaunchWeek/7/lw7_days'+import { opacityVariant4, scaleOpacityVariant2 } from '.'import styles from './day5.module.css'import Link from 'next/link'diff --git a/apps/www/components/LaunchWeek/Releases/LW7/components/index.tsx b/apps/www/components/LaunchWeek/7/Releases/components/index.tsxsimilarity index 100%rename from apps/www/components/LaunchWeek/Releases/LW7/components/index.tsxrename to apps/www/components/LaunchWeek/7/Releases/components/index.tsxdiff --git a/apps/www/components/LaunchWeek/Releases/LW7/day5.module.css b/apps/www/components/LaunchWeek/7/Releases/day5.module.csssimilarity index 100%rename from apps/www/components/LaunchWeek/Releases/LW7/day5.module.cssrename to apps/www/components/LaunchWeek/7/Releases/day5.module.cssdiff --git a/apps/www/components/LaunchWeek/Releases/LW7/LW7Releases.tsx b/apps/www/components/LaunchWeek/7/Releases/index.tsxsimilarity index 99%rename from apps/www/components/LaunchWeek/Releases/LW7/LW7Releases.tsxrename to apps/www/components/LaunchWeek/7/Releases/index.tsxindex bf6cf2c54be..6445cb5f8a2 100644--- a/apps/www/components/LaunchWeek/Releases/LW7/LW7Releases.tsx+++ b/apps/www/components/LaunchWeek/7/Releases/index.tsx@@ -3,7 +3,7 @@ import { useEffect } from 'react'import { Accordion } from 'ui'import Lottie from 'lottie-react'-import days, { WeekDayProps, endOfLW7 } from '~/components/LaunchWeek/lw7_days'+import days, { WeekDayProps, endOfLW7 } from '~/components/LaunchWeek/7/lw7_days'import SectionContainer from '~/components/Layouts/SectionContainer'import {AccordionHeader,diff --git a/apps/www/components/LaunchWeek/Releases/LW7/styles/launchWeek7.module.css b/apps/www/components/LaunchWeek/7/Releases/styles/launchWeek7.module.csssimilarity index 100%rename from apps/www/components/LaunchWeek/Releases/LW7/styles/launchWeek7.module.cssrename to apps/www/components/LaunchWeek/7/Releases/styles/launchWeek7.module.cssdiff --git a/apps/www/components/LaunchWeek/Releases/LW7/styles/utils7.module.css b/apps/www/components/LaunchWeek/7/Releases/styles/utils7.module.csssimilarity index 100%rename from apps/www/components/LaunchWeek/Releases/LW7/styles/utils7.module.cssrename to apps/www/components/LaunchWeek/7/Releases/styles/utils7.module.cssdiff --git a/apps/www/components/LaunchWeek/Ticket/ActualTicket.tsx b/apps/www/components/LaunchWeek/7/Ticket/ActualTicket.tsxsimilarity index 97%rename from apps/www/components/LaunchWeek/Ticket/ActualTicket.tsxrename to apps/www/components/LaunchWeek/7/Ticket/ActualTicket.tsxindex bb59bd906de..72afd641dfb 100644--- a/apps/www/components/LaunchWeek/Ticket/ActualTicket.tsx+++ b/apps/www/components/LaunchWeek/7/Ticket/ActualTicket.tsx@@ -1,14 +1,14 @@import cn from 'classnames'import { useRef, useState } from 'react'import styles from './ticket.module.css'-import styleUtils from './utils.module.css'+import styleUtils from '../../utils.module.css'import TicketVisual from './TicketVisual'import TicketActions from './TicketActions'import TicketCopy from './ticket-copy'-import { UserData } from './hooks/use-conf-data'+import { UserData } from '~/components/LaunchWeek/hooks/use-conf-data'import ReferralIndicator from '../ReferralIndicator'-import useWinningChances from './hooks/useWinningChances'+import useWinningChances from '../../hooks/useWinningChances'import { SITE_URL } from '~/lib/constants'import { useBreakpoint } from 'common/hooks/useBreakpoint'diff --git a/apps/www/components/LaunchWeek/Ticket/TicketActions.tsx b/apps/www/components/LaunchWeek/7/Ticket/TicketActions.tsxsimilarity index 97%rename from apps/www/components/LaunchWeek/Ticket/TicketActions.tsxrename to apps/www/components/LaunchWeek/7/Ticket/TicketActions.tsxindex ee351e58f04..ad775d8a483 100644--- a/apps/www/components/LaunchWeek/Ticket/TicketActions.tsx+++ b/apps/www/components/LaunchWeek/7/Ticket/TicketActions.tsx@@ -1,7 +1,7 @@import { useEffect, useRef, useState } from 'react'import { SITE_URL, TWEET_TEXT, TWEET_TEXT_GOLDEN } from '~/lib/constants'import { IconCheckCircle } from 'ui'-import useConfData from '~/components/LaunchWeek/Ticket//hooks/use-conf-data'+import useConfData from '~/components/LaunchWeek/hooks/use-conf-data'import { useParams } from '~/hooks/useParams'import TicketForm from './TicketForm'@@ -62,7 +62,7 @@ export default function TicketActions({<div className="text-scale-900"><IconCheckCircle size={10} strokeWidth={1} /></div>- Connect with Github+ Connect with GitHub</div></div><divdiff --git a/apps/www/components/LaunchWeek/Ticket/TicketContainer.tsx b/apps/www/components/LaunchWeek/7/Ticket/TicketContainer.tsxsimilarity index 92%rename from apps/www/components/LaunchWeek/Ticket/TicketContainer.tsxrename to apps/www/components/LaunchWeek/7/Ticket/TicketContainer.tsxindex 52e21d71abe..364f457d57d 100644--- a/apps/www/components/LaunchWeek/Ticket/TicketContainer.tsx+++ b/apps/www/components/LaunchWeek/7/Ticket/TicketContainer.tsx@@ -1,5 +1,5 @@import { useState } from 'react'-import { PageState, ConfDataContext, UserData } from './hooks/use-conf-data'+import { PageState, ConfDataContext, UserData } from '~/components/LaunchWeek/hooks/use-conf-data'import Ticket from './ActualTicket'import Form from './form'import { SupabaseClient, Session } from '@supabase/supabase-js'diff --git a/apps/www/components/LaunchWeek/Ticket/TicketForm.tsx b/apps/www/components/LaunchWeek/7/Ticket/TicketForm.tsxsimilarity index 96%rename from apps/www/components/LaunchWeek/Ticket/TicketForm.tsxrename to apps/www/components/LaunchWeek/7/Ticket/TicketForm.tsxindex 0e2bed3c4aa..babc14d61cf 100644--- a/apps/www/components/LaunchWeek/Ticket/TicketForm.tsx+++ b/apps/www/components/LaunchWeek/7/Ticket/TicketForm.tsx@@ -2,7 +2,7 @@ import { useState, useRef, useEffect } from 'react'import { useRouter } from 'next/router'import cn from 'classnames'import { SITE_ORIGIN } from '~/lib/constants'-import useConfData from '~/components/LaunchWeek/Ticket//hooks/use-conf-data'+import useConfData from '~/components/LaunchWeek/hooks/use-conf-data'import formStyles from './form.module.css'import ticketFormStyles from './ticket-form.module.css'import { Button, IconCheckCircle, IconLoader } from 'ui'@@ -40,7 +40,7 @@ export default function TicketForm({ defaultUsername = '', setTicketGenerationSt.eq('email', email).select().single()- .then(async ({ error }) => {+ .then(async ({ error }: any) => {// If error because of duplicate email, ignore and proceed, otherwise sign out.if (error && error?.code !== '23505') return supabase.auth.signOut()const { data } = await supabase@@ -79,7 +79,7 @@ export default function TicketForm({ defaultUsername = '', setTicketGenerationSttable: 'lw7_tickets',filter: `username=eq.${username}`,},- (payload) => {+ (payload: any) => {const golden = !!payload.new.sharedOnTwitter && !!payload.new.sharedOnLinkedInsetUserData({...payload.new,@@ -157,12 +157,12 @@ export default function TicketForm({ defaultUsername = '', setTicketGenerationSt{session ? (<><IconCheckCircle />- Connect with Github+ Connect with GitHub</>) : (<span className="flex items-center gap-2">{formState === 'loading' && <IconLoader size={14} className="animate-spin" />}- Connect with Github+ Connect with GitHub</span>)}</span>diff --git a/apps/www/components/LaunchWeek/Ticket/TicketHeader.tsx b/apps/www/components/LaunchWeek/7/Ticket/TicketHeader.tsxsimilarity index 81%rename from apps/www/components/LaunchWeek/Ticket/TicketHeader.tsxrename to apps/www/components/LaunchWeek/7/Ticket/TicketHeader.tsxindex da3d1e79401..2b082bb954a 100644--- a/apps/www/components/LaunchWeek/Ticket/TicketHeader.tsx+++ b/apps/www/components/LaunchWeek/7/Ticket/TicketHeader.tsx@@ -1,5 +1,5 @@import React from 'react'-import { DATE } from '~/lib/constants'+import { LW7_DATE } from '~/lib/constants'interface Props {size?: 'default' | 'small'@@ -12,7 +12,7 @@ export default function TicketHeader({ size }: Props) {className={size === 'small' ? 'w-[165px]' : 'w-[220px] md:w-[230px]'}src={`/images/launchweek/ticket-header-logo.png`}/>- <span className="text-white text-xs md:text-sm">{DATE}</span>+ <span className="text-white text-xs md:text-sm">{LW7_DATE}</span></div></div>)diff --git a/apps/www/components/LaunchWeek/Ticket/TicketNumber.tsx b/apps/www/components/LaunchWeek/7/Ticket/TicketNumber.tsxsimilarity index 100%rename from apps/www/components/LaunchWeek/Ticket/TicketNumber.tsxrename to apps/www/components/LaunchWeek/7/Ticket/TicketNumber.tsxdiff --git a/apps/www/components/LaunchWeek/Ticket/TicketProfile.tsx b/apps/www/components/LaunchWeek/7/Ticket/TicketProfile.tsxsimilarity index 100%rename from apps/www/components/LaunchWeek/Ticket/TicketProfile.tsxrename to apps/www/components/LaunchWeek/7/Ticket/TicketProfile.tsxdiff --git a/apps/www/components/LaunchWeek/Ticket/TicketVisual.tsx b/apps/www/components/LaunchWeek/7/Ticket/TicketVisual.tsxsimilarity index 98%rename from apps/www/components/LaunchWeek/Ticket/TicketVisual.tsxrename to apps/www/components/LaunchWeek/7/Ticket/TicketVisual.tsxindex be31e8c231c..7dffd9a3439 100644--- a/apps/www/components/LaunchWeek/Ticket/TicketVisual.tsx+++ b/apps/www/components/LaunchWeek/7/Ticket/TicketVisual.tsx@@ -2,7 +2,7 @@ import styles from './ticket-visual.module.css'import TicketProfile from './TicketProfile'import TicketNumber from './TicketNumber'import Tilt from 'vanilla-tilt'-import useConfData from '~/components/LaunchWeek/Ticket/hooks/use-conf-data'+import useConfData from '~/components/LaunchWeek/hooks/use-conf-data'import TicketHeader from './TicketHeader'import { useEffect, useRef, useState } from 'react'import Image from 'next/image'diff --git a/apps/www/components/LaunchWeek/Ticket/conf-container.module.css b/apps/www/components/LaunchWeek/7/Ticket/conf-container.module.csssimilarity index 100%rename from apps/www/components/LaunchWeek/Ticket/conf-container.module.cssrename to apps/www/components/LaunchWeek/7/Ticket/conf-container.module.cssdiff --git a/apps/www/components/LaunchWeek/Ticket/conf-container.tsx b/apps/www/components/LaunchWeek/7/Ticket/conf-container.tsxsimilarity index 100%rename from apps/www/components/LaunchWeek/Ticket/conf-container.tsxrename to apps/www/components/LaunchWeek/7/Ticket/conf-container.tsxdiff --git a/apps/www/components/LaunchWeek/Ticket/form.module.css b/apps/www/components/LaunchWeek/7/Ticket/form.module.csssimilarity index 100%rename from apps/www/components/LaunchWeek/Ticket/form.module.cssrename to apps/www/components/LaunchWeek/7/Ticket/form.module.cssdiff --git a/apps/www/components/LaunchWeek/Ticket/form.tsx b/apps/www/components/LaunchWeek/7/Ticket/form.tsxsimilarity index 96%rename from apps/www/components/LaunchWeek/Ticket/form.tsxrename to apps/www/components/LaunchWeek/7/Ticket/form.tsxindex d8a9c9dbc3d..15b20e2edb8 100644--- a/apps/www/components/LaunchWeek/Ticket/form.tsx+++ b/apps/www/components/LaunchWeek/7/Ticket/form.tsx@@ -1,10 +1,10 @@import { useState, useCallback } from 'react'import cn from 'classnames'-import useConfData from '~/components/LaunchWeek/Ticket/hooks/use-conf-data'+import useConfData from '~/components/LaunchWeek/hooks/use-conf-data'import { useRouter } from 'next/router'-import styleUtils from './utils.module.css'+import styleUtils from '../../utils.module.css'import styles from './form.module.css'-import useEmailQueryParam from '~/components/LaunchWeek/Ticket/hooks/use-email-query-param'+import useEmailQueryParam from '~/components/LaunchWeek/hooks/use-email-query-param'import { IconLoader } from '~/../../packages/ui'type FormState = 'default' | 'loading' | 'error'diff --git a/apps/www/components/LaunchWeek/Ticket/loading-dots.module.css b/apps/www/components/LaunchWeek/7/Ticket/loading-dots.module.csssimilarity index 100%rename from apps/www/components/LaunchWeek/Ticket/loading-dots.module.cssrename to apps/www/components/LaunchWeek/7/Ticket/loading-dots.module.cssdiff --git a/apps/www/components/LaunchWeek/Ticket/loading-dots.tsx b/apps/www/components/LaunchWeek/7/Ticket/loading-dots.tsxsimilarity index 100%rename from apps/www/components/LaunchWeek/Ticket/loading-dots.tsxrename to apps/www/components/LaunchWeek/7/Ticket/loading-dots.tsxdiff --git a/apps/www/components/LaunchWeek/Ticket/ticket-actions.module.css b/apps/www/components/LaunchWeek/7/Ticket/ticket-actions.module.csssimilarity index 100%rename from apps/www/components/LaunchWeek/Ticket/ticket-actions.module.cssrename to apps/www/components/LaunchWeek/7/Ticket/ticket-actions.module.cssdiff --git a/apps/www/components/LaunchWeek/Ticket/ticket-copy.module.css b/apps/www/components/LaunchWeek/7/Ticket/ticket-copy.module.csssimilarity index 100%rename from apps/www/components/LaunchWeek/Ticket/ticket-copy.module.cssrename to apps/www/components/LaunchWeek/7/Ticket/ticket-copy.module.cssdiff --git a/apps/www/components/LaunchWeek/Ticket/ticket-copy.tsx b/apps/www/components/LaunchWeek/7/Ticket/ticket-copy.tsxsimilarity index 98%rename from apps/www/components/LaunchWeek/Ticket/ticket-copy.tsxrename to apps/www/components/LaunchWeek/7/Ticket/ticket-copy.tsxindex c228e815a67..2286aae4293 100644--- a/apps/www/components/LaunchWeek/Ticket/ticket-copy.tsx+++ b/apps/www/components/LaunchWeek/7/Ticket/ticket-copy.tsx@@ -1,7 +1,7 @@import { useEffect, useState, useRef } from 'react'import cn from 'classnames'import { SITE_URL } from '~/lib/constants'-import styleUtils from './utils.module.css'+import styleUtils from '../../utils.module.css'import { IconCopy, IconCheck } from 'ui'type Props = {diff --git a/apps/www/components/LaunchWeek/Ticket/ticket-form.module.css b/apps/www/components/LaunchWeek/7/Ticket/ticket-form.module.csssimilarity index 100%rename from apps/www/components/LaunchWeek/Ticket/ticket-form.module.cssrename to apps/www/components/LaunchWeek/7/Ticket/ticket-form.module.cssdiff --git a/apps/www/components/LaunchWeek/Ticket/ticket-image.module.css b/apps/www/components/LaunchWeek/7/Ticket/ticket-image.module.csssimilarity index 100%rename from apps/www/components/LaunchWeek/Ticket/ticket-image.module.cssrename to apps/www/components/LaunchWeek/7/Ticket/ticket-image.module.cssdiff --git a/apps/www/components/LaunchWeek/Ticket/ticket-image.tsx b/apps/www/components/LaunchWeek/7/Ticket/ticket-image.tsxsimilarity index 100%rename from apps/www/components/LaunchWeek/Ticket/ticket-image.tsxrename to apps/www/components/LaunchWeek/7/Ticket/ticket-image.tsxdiff --git a/apps/www/components/LaunchWeek/Ticket/ticket-info-footer.tsx b/apps/www/components/LaunchWeek/7/Ticket/ticket-info-footer.tsxsimilarity index 90%rename from apps/www/components/LaunchWeek/Ticket/ticket-info-footer.tsxrename to apps/www/components/LaunchWeek/7/Ticket/ticket-info-footer.tsxindex 7dd3b821630..375223f161c 100644--- a/apps/www/components/LaunchWeek/Ticket/ticket-info-footer.tsx+++ b/apps/www/components/LaunchWeek/7/Ticket/ticket-info-footer.tsx@@ -1,6 +1,6 @@import styles from './ticket-info.module.css'import cn from 'classnames'-import { DATE, SITE_URL } from '~/lib/constants'+import { LW7_DATE, SITE_URL } from '~/lib/constants'const siteUrl = new URL(SITE_URL)const siteUrlForTicket = `${siteUrl.host}${siteUrl.pathname}`.replace(/\/$/, '')@@ -16,7 +16,7 @@ export default function TicketInfoFooter({golden && '!text-white'}`}>- <div>{DATE}</div>+ <div>{LW7_DATE}</div></div><divclassName={`${cn(styles.date, { [styles['date-golden']]: golden })} text-sm ${diff --git a/apps/www/components/LaunchWeek/Ticket/ticket-info.module.css b/apps/www/components/LaunchWeek/7/Ticket/ticket-info.module.csssimilarity index 100%rename from apps/www/components/LaunchWeek/Ticket/ticket-info.module.cssrename to apps/www/components/LaunchWeek/7/Ticket/ticket-info.module.cssdiff --git a/apps/www/components/LaunchWeek/Ticket/ticket-mono-mobile.tsx b/apps/www/components/LaunchWeek/7/Ticket/ticket-mono-mobile.tsxsimilarity index 100%rename from apps/www/components/LaunchWeek/Ticket/ticket-mono-mobile.tsxrename to apps/www/components/LaunchWeek/7/Ticket/ticket-mono-mobile.tsxdiff --git a/apps/www/components/LaunchWeek/Ticket/ticket-mono.tsx b/apps/www/components/LaunchWeek/7/Ticket/ticket-mono.tsxsimilarity index 100%rename from apps/www/components/LaunchWeek/Ticket/ticket-mono.tsxrename to apps/www/components/LaunchWeek/7/Ticket/ticket-mono.tsxdiff --git a/apps/www/components/LaunchWeek/Ticket/ticket-profile.module.css b/apps/www/components/LaunchWeek/7/Ticket/ticket-profile.module.csssimilarity index 100%rename from apps/www/components/LaunchWeek/Ticket/ticket-profile.module.cssrename to apps/www/components/LaunchWeek/7/Ticket/ticket-profile.module.cssdiff --git a/apps/www/components/LaunchWeek/Ticket/ticket-visual.module.css b/apps/www/components/LaunchWeek/7/Ticket/ticket-visual.module.csssimilarity index 100%rename from apps/www/components/LaunchWeek/Ticket/ticket-visual.module.cssrename to apps/www/components/LaunchWeek/7/Ticket/ticket-visual.module.cssdiff --git a/apps/www/components/LaunchWeek/Ticket/ticket.module.css b/apps/www/components/LaunchWeek/7/Ticket/ticket.module.csssimilarity index 100%rename from apps/www/components/LaunchWeek/Ticket/ticket.module.cssrename to apps/www/components/LaunchWeek/7/Ticket/ticket.module.cssdiff --git a/apps/www/components/LaunchWeek/Ticket/TicketsGrid.tsx b/apps/www/components/LaunchWeek/7/TicketsGrid.tsxsimilarity index 96%rename from apps/www/components/LaunchWeek/Ticket/TicketsGrid.tsxrename to apps/www/components/LaunchWeek/7/TicketsGrid.tsxindex dfaaf8f54a2..1ef8002bf85 100644--- a/apps/www/components/LaunchWeek/Ticket/TicketsGrid.tsx+++ b/apps/www/components/LaunchWeek/7/TicketsGrid.tsx@@ -2,7 +2,7 @@ import { motion } from 'framer-motion'import Image from 'next/image'import Link from 'next/link'import { useBreakpoint } from 'common/hooks/useBreakpoint'-import { UserData } from './hooks/use-conf-data'+import { UserData } from '../hooks/use-conf-data'interface Props {loadedUsers: UserData[]@@ -36,7 +36,7 @@ export default function TicketsGrid({ loadedUsers, isLoading, pageCount, offsetreturn (<Link- href={`/launch-week/tickets/${user.username}`}+ href={`/launch-week/7/tickets/${user.username}`}key={`${user.username}-000${i}`}onClick={() => window.scrollTo(0, 0)}>diff --git a/apps/www/components/LaunchWeek/lw7-bg-graphic.module.css b/apps/www/components/LaunchWeek/7/lw7-bg-graphic.module.csssimilarity index 100%rename from apps/www/components/LaunchWeek/lw7-bg-graphic.module.cssrename to apps/www/components/LaunchWeek/7/lw7-bg-graphic.module.cssdiff --git a/apps/www/components/LaunchWeek/lw7_days.ts b/apps/www/components/LaunchWeek/7/lw7_days.tssimilarity index 100%rename from apps/www/components/LaunchWeek/lw7_days.tsrename to apps/www/components/LaunchWeek/7/lw7_days.tsdiff --git a/apps/www/components/LaunchWeek/8/AnimatedParticles/Particle.tsx b/apps/www/components/LaunchWeek/8/AnimatedParticles/Particle.tsxnew file mode 100644index 00000000000..29908f79016--- /dev/null+++ b/apps/www/components/LaunchWeek/8/AnimatedParticles/Particle.tsx@@ -0,0 +1,49 @@+import React, { useRef } from 'react'+import { useFrame } from '@react-three/fiber'++interface Props {+ animate?: boolean+ children: any+ config: any+ user?: any+}++const Particle = ({ animate = true, children, config }: Props) => {+ const particle = useRef<any>(null)++ const pathOffsetShape =+ Math.pow(+ Math.random() * config.xRandomnessShape,+ config.xRandomness - 1 + 1 - config.xRandomness / 2+ ) * config.xThickness++ const pathOffset = pathOffsetShape * (pathOffsetShape < 1 || Math.random() < 0.5 ? 1 : -1)+ const verticalRandomness = Math.random() * (config.yThickness - 1) + 1 - config.yThickness / 2++ const speed = Math.random() * (config.min_speed - config.max_speed) + config.max_speed++ const circumference = (config.widthRadius * Math.PI * 2) / 100+ const delayOffsetFactor = 100+ const delayOffset = Math.random() * delayOffsetFactor++ useFrame(({ clock }) => {+ if (animate) {+ const timer = clock.getElapsedTime() * speed + delayOffset+ // When the loop count is even, draw bottom 8 shape+ // if odd, draw top 8 shape+ const isEven = Math.floor(timer / circumference) % 2 == 0+ particle.current.position.x = isEven+ ? Math.sin(timer) * config.widthRadius * config.widthRatio + pathOffset+ : Math.sin(timer) * config.widthRadius + pathOffset+ particle.current.position.y = isEven+ ? Math.cos(timer) * config.bottomHeightRadius -+ config.bottomHeightRadius ++ verticalRandomness+ : -Math.cos(timer) * config.topHeightRadius + config.topHeightRadius + verticalRandomness+ }+ })++ return <mesh ref={particle}>{children}</mesh>+}++export default Particlediff --git a/apps/www/components/LaunchWeek/8/AnimatedParticles/ParticleHoverable.tsx b/apps/www/components/LaunchWeek/8/AnimatedParticles/ParticleHoverable.tsxnew file mode 100644index 00000000000..27811c3f880--- /dev/null+++ b/apps/www/components/LaunchWeek/8/AnimatedParticles/ParticleHoverable.tsx@@ -0,0 +1,94 @@+import React, { useRef, useEffect, useState } from 'react'+import { useFrame } from '@react-three/fiber'+import { Html } from '@react-three/drei'++interface Props {+ animate?: boolean+ children: any+ config: any+ user: any+}++const Particle = ({ animate = true, user, children, config }: Props) => {+ const particle = useRef<any>(null)+ const isDebugMode = !user?.username+ const [isHovered, setIsHovered] = useState(false)++ useEffect(() => {+ if (isHovered) {+ setTimeout(() => {+ setIsHovered(false)+ }, 1000)+ }+ }, [isHovered])++ const timestamp = new Date(user.createdAt).getTime()+ const unixTimestamp = Math.floor(timestamp / 1000)+ const lastDigit = parseInt(timestamp.toString().split('')?.pop() as string)++ const pathOffsetShape = isDebugMode+ ? Math.pow(+ Math.random() * config.xRandomnessShape,+ config.xRandomness - 1 + 1 - config.xRandomness / 2+ ) * config.xThickness+ : Math.pow(+ Math.random() * config.xRandomnessShape,+ config.xRandomness - 1 + 1 - config.xRandomness / 2+ ) * config.xThickness++ const pathOffset = pathOffsetShape * (pathOffsetShape < 1 || Math.random() < 0.5 ? 1 : -1)+ const verticalRandomness = isDebugMode+ ? Math.random() * (config.yThickness - 1) + 1 - config.yThickness / 2+ : Math.random() * (config.yThickness - 1) + 1 - config.yThickness / 2++ const smol = (unixTimestamp / 10000000000) * -1+ const sub1 = 1 / smol++ console.log(smol, sub1)+ const speed = isDebugMode+ ? Math.random() * (config.min_speed - config.max_speed) + config.max_speed+ : sub1 * (config.min_speed - config.max_speed) + config.max_speed+ // Math.random() * (config.min_speed - config.max_speed) + config.max_speed++ const circumference = (config.widthRadius * Math.PI * 2) / 100+ const delayOffsetFactor = 100+ const delayOffset = isDebugMode ? Math.random() : unixTimestamp * delayOffsetFactor++ useFrame(({ clock }) => {+ if (animate) {+ const timer = clock.getElapsedTime() * speed + delayOffset+ // When the loop count is even, draw bottom 8 shape+ // if odd, draw top 8 shape+ const isEven = Math.floor(timer / circumference) % 2 == 0+ particle.current.position.x = isEven+ ? Math.sin(timer) * config.widthRadius * config.widthRatio + pathOffset+ : Math.sin(timer) * config.widthRadius + pathOffset+ particle.current.position.y = isEven+ ? Math.cos(timer) * config.bottomHeightRadius -+ config.bottomHeightRadius ++ verticalRandomness+ : -Math.cos(timer) * config.topHeightRadius + config.topHeightRadius + verticalRandomness+ }+ })++ return (+ <mesh ref={particle} onPointerEnter={() => !isDebugMode && setIsHovered(true)}>+ {children}++ {!isDebugMode && isHovered && user.username && (+ <Html+ as="div"+ position={[1, 0, 0]}+ wrapperClass={[+ `invisible hidden text-[11px] text-[#aaaec2] bg-black items-center justify-center rounded-full py-1 px-2 [&>div]:!relative`,+ isHovered && '!visible !flex',+ ].join(' ')}+ >+ @{user.username}+ </Html>+ )}+ </mesh>+ )+}++export default Particlediff --git a/apps/www/components/LaunchWeek/8/AnimatedParticles/ParticlesCanvas.tsx b/apps/www/components/LaunchWeek/8/AnimatedParticles/ParticlesCanvas.tsxnew file mode 100644index 00000000000..904710ded6a--- /dev/null+++ b/apps/www/components/LaunchWeek/8/AnimatedParticles/ParticlesCanvas.tsx@@ -0,0 +1,140 @@+import React, { useMemo, useEffect, useState } from 'react'+import { Canvas } from '@react-three/fiber'+import { AdditiveBlending } from 'three'+import Particle from './Particle'+import useParticlesConfig from './hooks/useParticlesConfig'+import { SupabaseClient } from '@supabase/supabase-js'++const ParticlesCanvas = ({ supabase, users }: { supabase?: SupabaseClient; users: any }) => {+ const isWindowUndefined = typeof window === 'undefined'+ if (isWindowUndefined) return null++ const canvasRef = React.useRef(null)++ const [animate, setAnimate] = useState<boolean>(true)+ const { config, handleSetConfig, particles, setParticles, isDebugMode } =+ useParticlesConfig(users)+ const [realtimeChannel, setRealtimeChannel] = useState<ReturnType<+ (typeof supabase | any)['channel']+ > | null>(null)++ const loadUsers = async () => {+ return await supabase!.from('lw8_tickets_golden').select('id, golden', { count: 'exact' })+ }++ // Update particles live when new tickets are generated+ useEffect(() => {+ if (!!supabase) {+ const channel = supabase+ .channel('lw8_tickets_changes')+ .on(+ 'postgres_changes',+ {+ event: 'INSERT',+ schema: 'public',+ table: 'lw8_tickets_golden',+ },+ async () => {+ const { data: users } = await loadUsers()++ handleSetConfig('particles', users?.length)+ setParticles((prev: any) => users! ?? prev)+ }+ )+ .subscribe()+ setRealtimeChannel(channel)+ }++ return () => {+ // Cleanup realtime subscription on unmount+ realtimeChannel?.unsubscribe()+ }+ }, [])++ // stop animation if canvas if is not in viewport+ // to avoid unnecessary computations+ const handleScroll = () => {+ if (canvasRef.current && typeof window !== 'undefined') {+ const rect = (canvasRef.current as HTMLDivElement)?.getBoundingClientRect()+ const isInView = rect.bottom > 0++ setAnimate(isInView)+ }+ }++ useEffect(() => {+ window.addEventListener('scroll', handleScroll)++ return () => {+ window.removeEventListener('scroll', handleScroll)+ }+ }, [])++ /* ThreeJs setup */++ const Geometry = useMemo(+ () => () => <circleGeometry args={[config.particlesSize, config.particlesSides]} />,+ []+ )+ const GoldGeometry = useMemo(+ () => () => <circleGeometry args={[config.goldParticlesSize, config.particlesSides]} />,+ []+ )+ const Material = () =>+ useMemo(+ () => (+ <meshStandardMaterial+ color={config.color}+ blending={config.particlesBlending ? AdditiveBlending : undefined}+ />+ ),+ []+ )+ const GoldMaterial = () =>+ useMemo(+ () => (+ <meshPhysicalMaterial+ color={config.colorGold}+ metalness={35}+ blending={config.particlesBlending ? AdditiveBlending : undefined}+ />+ ),+ []+ )++ return (+ <Canvas+ ref={canvasRef}+ dpr={[1, 2]}+ camera={{ fov: 75, position: [0, 0, 500] }}+ className="relative z-30"+ >+ <ambientLight intensity={config.lightIntensity} />+ <group position={[0, 70, 0]} scale={[0.9, 0.9, 0.9]}>+ {/* Animated 8 shape particles */}+ {particles?.map((user: any, index: number) => (+ <Particle+ key={`particle-${user.username ?? index}`}+ user={user}+ config={config}+ animate={animate}+ >+ {(!!user.id && user.golden) || (config.showGold && Math.random() <= 0.5) ? (+ <>+ <GoldGeometry />+ <GoldMaterial />+ </>+ ) : (+ <>+ <Geometry />+ <Material />+ </>+ )}+ </Particle>+ ))}+ </group>+ </Canvas>+ )+}++export default ParticlesCanvasdiff --git a/apps/www/components/LaunchWeek/8/AnimatedParticles/hooks/useParticlesConfig.tsx b/apps/www/components/LaunchWeek/8/AnimatedParticles/hooks/useParticlesConfig.tsxnew file mode 100644index 00000000000..6eb0dadb087--- /dev/null+++ b/apps/www/components/LaunchWeek/8/AnimatedParticles/hooks/useParticlesConfig.tsx@@ -0,0 +1,182 @@+import { useEffect, useState } from 'react'+import { range } from 'lodash'++let defaultConfig = {+ particles: 20,+ particlesSize: 1.2,+ goldParticlesSize: 1.5,+ particlesSides: 5,+ particlesBlending: true,+ lightIntensity: 0.3,+ widthRadius: 100,+ widthRatio: 1.2,+ topHeightRadius: 80,+ bottomHeightRadius: 100,+ trails: 0,+ trailWidth: 40,+ trailLength: 100,+ trailDecay: 450,+ color: 'white',+ colorGold: '#b89d18',+ xThickness: 7,+ xRandomnessFactor: 2.2,+ xRandomnessShape: 2.2,+ xRandomness: 5,+ yThickness: 20,+ max_speed: 0.1,+ min_speed: -0.1,+ showGold: true,+}++const useParticlesConfig = (users: any): any => {+ const isWindowUndefined = typeof window === 'undefined'+ if (isWindowUndefined) return null+ const hash = window.location.hash+ const isDebugMode = hash.includes('#debug')+ const [particles, setParticles] = useState<any[]>(users)++ const [config, setConfig] = useState(defaultConfig)++ const handleSetConfig = (name: string, value: any) => {+ setConfig((prevConfig) => ({ ...prevConfig, [name]: value }))+ }++ const init = async () => {+ if (!isDebugMode) return+ const dat = await import('dat.gui')+ const gui = new dat.GUI()+ const particlesFolder = gui.addFolder('Particles')+ const shapeFolder = gui.addFolder('Shape')+ const speedFolder = gui.addFolder('Speed')+ // const trailFolder = gui.addFolder('Trail')+ gui.width = 500+ particlesFolder+ .add(config, 'particles')+ .min(1)+ .max(5000)+ .step(1)+ .name('Count')+ .onChange((value) => {+ handleSetConfig('particles', value)+ setParticles(range(0, value))+ })+ particlesFolder+ .add(config, 'particlesSize')+ .min(1)+ .max(10)+ .step(0.05)+ .name('Size')+ .onChange((value) => handleSetConfig('particlesSize', value))+ particlesFolder+ .add(config, 'goldParticlesSize')+ .min(1)+ .max(10)+ .step(0.05)+ .name('Gold Particles Size')+ .onChange((value) => handleSetConfig('goldParticlesSize', value))+ particlesFolder+ .add(config, 'particlesSides')+ .min(3)+ .max(20)+ .step(1)+ .name('Sides')+ .onChange((value) => handleSetConfig('particlesSides', value))+ particlesFolder+ .add(config, 'lightIntensity')+ .min(0)+ .max(10)+ .step(0.05)+ .name('Light intensity')+ .onChange((value) => handleSetConfig('lightIntensity', value))+ particlesFolder+ .add(config, 'showGold')+ .name('Show Gold Particles')+ .onChange((value) => handleSetConfig('showGold', value))+ particlesFolder+ .add(config, 'particlesBlending')+ .name('Blending')+ .onChange((value) => handleSetConfig('particlesBlending', value))+ shapeFolder+ .add(config, 'widthRadius')+ .min(1)+ .max(200)+ .step(1)+ .name('Width Radius')+ .onChange((value) => handleSetConfig('widthRadius', value))+ shapeFolder+ .add(config, 'widthRatio')+ .min(0.5)+ .max(3)+ .step(0.01)+ .name('Top/Bottom Ratio')+ .onChange((value) => handleSetConfig('widthRatio', value))+ shapeFolder+ .add(config, 'topHeightRadius')+ .min(1)+ .max(200)+ .step(1)+ .name('Height Radius - Top')+ .onChange((value) => handleSetConfig('topHeightRadius', value))+ shapeFolder+ .add(config, 'bottomHeightRadius')+ .min(1)+ .max(200)+ .step(1)+ .name('Height Radius - Bottom')+ .onChange((value) => handleSetConfig('bottomHeightRadius', value))+ shapeFolder+ .add(config, 'xThickness')+ .min(1)+ .max(100)+ .step(0.1)+ .name('Stroke Width')+ .onChange((value) => handleSetConfig('xThickness', value))+ shapeFolder+ .add(config, 'xRandomnessShape')+ .min(0)+ .max(5)+ .step(0.001)+ .name('Randomness shape')+ .onChange((value) => handleSetConfig('xRandomnessShape', value))+ shapeFolder+ .add(config, 'xRandomness')+ .min(0)+ .max(50)+ .step(0.01)+ .name('Randomness')+ .onChange((value) => handleSetConfig('xRandomness', value))+ shapeFolder+ .add(config, 'yThickness')+ .min(1)+ .max(50)+ .step(0.1)+ .name('y thickness')+ .onChange((value) => handleSetConfig('yThickness', value))+ speedFolder+ .add(config, 'min_speed')+ .min(-6)+ .max(6)+ .step(0.01)+ .name('Min speed')+ .onChange((value) => handleSetConfig('min_speed', value))+ speedFolder+ .add(config, 'max_speed')+ .min(-6)+ .max(6)+ .step(0.01)+ .name('Max speed')+ .onChange((value) => handleSetConfig('max_speed', value))++ particlesFolder.open()+ shapeFolder.open()+ speedFolder.open()+ }++ useEffect(() => {+ init()+ }, [])++ return { config, handleSetConfig, particles, setParticles, isDebugMode }+}++export default useParticlesConfigdiff --git a/apps/www/components/LaunchWeek/8/Countdown.tsx b/apps/www/components/LaunchWeek/8/Countdown.tsxnew file mode 100644index 00000000000..322b7a944db--- /dev/null+++ b/apps/www/components/LaunchWeek/8/Countdown.tsx@@ -0,0 +1,20 @@+import React from 'react'+import Countdown from 'react-countdown'+import { CountdownWidget } from 'ui'+import { LW8_LAUNCH_DATE } from '~/lib/constants'++const CountdownComponent = () => {+ const renderer = ({ days, hours, minutes, seconds, completed }: any) => {+ if (completed) {+ // Render a completed state+ return null+ } else {+ // Render countdown+ return <CountdownWidget days={days} hours={hours} minutes={minutes} seconds={seconds} />+ }+ }++ return <Countdown date={new Date(LW8_LAUNCH_DATE)} renderer={renderer} />+}++export default CountdownComponentdiff --git a/apps/www/components/LaunchWeek/8/LabelBadge.tsx b/apps/www/components/LaunchWeek/8/LabelBadge.tsxnew file mode 100644index 00000000000..521970158fa--- /dev/null+++ b/apps/www/components/LaunchWeek/8/LabelBadge.tsx@@ -0,0 +1,14 @@+import React from 'react'++interface Props {+ text: string+ className?: string+}++export default function LabelBadge({ text, className }: Props) {+ return (+ <span className={['bg-[#222428] rounded px-1 py-[1px] text-xs', className].join(' ')}>+ <span className="text-scale-1000">{text}</span>+ </span>+ )+}diff --git a/apps/www/components/LaunchWeek/8/LaunchWeekLogoHeader.tsx b/apps/www/components/LaunchWeek/8/LaunchWeekLogoHeader.tsxnew file mode 100644index 00000000000..4c0786c62c3--- /dev/null+++ b/apps/www/components/LaunchWeek/8/LaunchWeekLogoHeader.tsx@@ -0,0 +1,31 @@+import Link from 'next/link'+import CountdownComponent from './Countdown'++export function LaunchWeekLogoHeader() {+ return (+ <div className="flex flex-col gap-1 md:gap-2 items-center justify-end">+ <div className="opacity-0 !animate-[fadeIn_0.5s_cubic-bezier(0.25,0.25,0,1)_0.5s_both] px-2 flex flex-col items-center text-center gap-3">+ <div className="">+ <CountdownComponent />+ </div>+ <h1 className="sr-only font-normal uppercase text-[28px] sm:text-[32px]">Launch week 8</h1>+ <p className="text-white radial-gradient-text-scale-600 text-lg sm:text-2xl">+ <span className="block">August 7th–11th, 2023</span>+ <span>9:00 AM PT</span>+ </p>+ <div className="text-[#9296AA]">+ Join us in a week of announcing new features. <br className="hidden md:block" />+ Connect with GitHub to generate your unique ticket and contribute to the constellation.+ <span className="inline sm:block">+ {' '}+ You might also win{' '}+ <Link href="#lw8-prizes">+ <a className="underline transition-opacity hover:text-scale-1200">swag</a>+ </Link>+ .+ </span>+ </div>+ </div>+ </div>+ )+}diff --git a/apps/www/components/LaunchWeek/8/LaunchWeekPrizeCard.tsx b/apps/www/components/LaunchWeek/8/LaunchWeekPrizeCard.tsxnew file mode 100644index 00000000000..353fb85499e--- /dev/null+++ b/apps/www/components/LaunchWeek/8/LaunchWeekPrizeCard.tsx@@ -0,0 +1,69 @@+import Image from 'next/image'+import React from 'react'+import { motion } from 'framer-motion'++type animateFromType = 'left' | 'right' | 'up' | 'down' | 'opacityOnly'++export default function LaunchWeekPrizeCard({+ imageUrl = '',+ imageWrapperClassName,+ content,+ className,+ animateFrom,+ imgObjectPosition = 'center',+}: {+ imageUrl: string+ imageWrapperClassName?: string+ content: any+ className?: string+ animateFrom?: animateFromType+ imgObjectPosition?: string+}) {+ const finalState = { x: 0, y: 0, opacity: 1 }++ function getAnimationFrom(animationDirection: animateFromType) {+ switch (animationDirection) {+ case 'left':+ return { x: -20, opacity: 0 }+ case 'up':+ return { y: -20, opacity: 0 }+ case 'right':+ return { x: 20, opacity: 0 }+ case 'down':+ return { y: 20, opacity: 0 }+ case 'opacityOnly':+ return { opacity: 0 }+ }+ }++ return (+ <motion.div+ className={[+ 'relative p-[1px] bg-gradient-to-b from-[#22282a] to-[#030A0C] rounded-lg overflow-hidden shadow-lg',+ className && className,+ ].join(' ')}+ initial={animateFrom ? getAnimationFrom(animateFrom) : finalState}+ whileInView={finalState}+ viewport={{ once: true, margin: '-50px' }}+ transition={{ type: 'spring', bounce: 0, delay: 0.5 }}+ >+ <div className="relative h-full flex flex-col bg-[#030A0C] rounded-lg overflow-hidden">+ <div+ className={[+ "relative w-full flex-grow before:content[' '] before:absolute before:inset-0 before:z-10 before:bg-gradient-to-t before:from-[#030A0C] before:via-transparent",+ imageWrapperClassName && imageWrapperClassName,+ ].join(' ')}+ >+ <Image+ src={imageUrl}+ layout="fill"+ objectFit="cover"+ quality={100}+ objectPosition={imgObjectPosition}+ />+ </div>+ <div className="p-4 flex flex-col gap-2 items-start">{content && content}</div>+ </div>+ </motion.div>+ )+}diff --git a/apps/www/components/LaunchWeek/8/LaunchWeekPrizeSection.tsx b/apps/www/components/LaunchWeek/8/LaunchWeekPrizeSection.tsxnew file mode 100644index 00000000000..db63021877c--- /dev/null+++ b/apps/www/components/LaunchWeek/8/LaunchWeekPrizeSection.tsx@@ -0,0 +1,99 @@+import React from 'react'+import LabelBadge from './LabelBadge'+import LaunchWeekPrizeCard from './LaunchWeekPrizeCard'+import Image from 'next/image'++export default function LaunchWeekPrizeSection({+ className,+ ticket,+}: {+ className?: string+ ticket?: any+}) {+ const Ticket = ticket++ return (+ <div id="lw8-prizes" className={['relative scroll-mt-[66px]', className].join(' ')}>+ <div className="absolute z-0 w-full aspect-[1.75/1] top-0 items-center justify-center">+ <Image+ src="/images/launchweek/8/swag-bg.png"+ alt="prizes background"+ layout="fill"+ objectFit="cover"+ objectPosition="top"+ quality={100}+ />+ </div>+ <div className="!max-w-[100vw]">+ <div className="w-full container mx-auto h-px bg-gradient-to-r from-transparent via-scale-600 to-transparent" />+ <div className="text-center relative z-10 text-white">+ <div className="max-w-[38rem] mx-auto flex flex-col items-center gap-4 px-4">+ <div className="relative z-10 w-full h-[100px] md:h-[130px] rounded-sm flex mt-16 items-center justify-center">+ <Image+ src="/images/launchweek/8/swag-illustration.png"+ alt="prizes"+ layout="fill"+ objectFit="contain"+ quality={100}+ />+ </div>+ <h2 className="text-4xl">Get your winning ticket</h2>+ <p className="text-[#9296AA]">+ Join us on August 11th for Launch Week 8's final day+ <br className="hidden md:inline-block" /> and find out if you are one of the lucky+ winners. Get sharing!+ </p>+ </div>+ </div>+ {ticket && <Ticket />}+ <div className="pt-8 lg:pt-16 px-4">+ <div className="grid grid-cols-1 md:grid-cols-3 gap-4 max-w-7xl mx-auto h-auto text-white">+ <LaunchWeekPrizeCard+ className="col-span-full"+ imageUrl="/images/launchweek/8/swag/deskmat-lg.jpg"+ imageWrapperClassName="w-full aspect-[1.9/1] md:h-[300px]"+ imgObjectPosition="center"+ content={+ <h3 className="w-full text-sm md:text-center flex md:justify-center items-center gap-4">+ Supabase Desk Mat <LabelBadge text="10 pieces" />+ </h3>+ }+ animateFrom="down"+ />+ <LaunchWeekPrizeCard+ imageUrl="/images/launchweek/8/swag/shirt.jpg"+ imageWrapperClassName="w-full aspect-[1.9/1]"+ imgObjectPosition="right"+ content={+ <h3 className="text-sm flex items-center gap-4">+ Supabase T-Shirt <LabelBadge text="20 pieces" />+ </h3>+ }+ animateFrom="down"+ />+ <LaunchWeekPrizeCard+ imageUrl="/images/launchweek/8/swag/cap.jpg"+ imageWrapperClassName="w-full aspect-[1.9/1]"+ animateFrom="down"+ content={+ <h3 className="text-sm flex items-center gap-4">+ Supabase Cap <LabelBadge text="25 caps" />+ </h3>+ }+ />+ <LaunchWeekPrizeCard+ imageUrl="/images/launchweek/8/swag/stickers.jpg"+ imageWrapperClassName="w-full aspect-[1.9/1]"+ animateFrom="down"+ content={+ <h3 className="text-sm flex items-center gap-4">+ Supabase Sticker Pack <LabelBadge text="50 packs" />+ </h3>+ }+ />+ </div>+ </div>+ </div>+ </div>+ )+}diff --git a/apps/www/components/LaunchWeek/8/Ticket/Ticket.tsx b/apps/www/components/LaunchWeek/8/Ticket/Ticket.tsxnew file mode 100644index 00000000000..71a0b3113ed--- /dev/null+++ b/apps/www/components/LaunchWeek/8/Ticket/Ticket.tsx@@ -0,0 +1,79 @@+import styles from './ticket-visual.module.css'+import TicketProfile from './TicketProfile'+import TicketNumber from './TicketNumber'+import { UserData } from '~/components/LaunchWeek/hooks/use-conf-data'+import TicketHeader from './TicketHeader'+import Image from 'next/image'+import TicketForm from './TicketForm'+import TicketFooter from './TicketFooter'++type TicketGenerationState = 'default' | 'loading'+type Props = {+ user: UserData+ ticketGenerationState?: TicketGenerationState+ setTicketGenerationState?: any+}++export default function TicketVisual({+ user,+ ticketGenerationState = 'default',+ setTicketGenerationState,+}: Props) {+ const { username, golden = false, bg_image_id: bgImageId, ticketNumber } = user++ const ticketBg = {+ regular: {+ background: `/images/launchweek/8/ticket-bg/regular.png`,+ },+ golden: {+ background: `/images/launchweek/8/ticket-bg/golden.png`,+ },+ }++ const CURRENT_TICKET = golden ? 'golden' : 'regular'+ const CURRENT_TICKET_BG = ticketBg[CURRENT_TICKET].background++ return (+ <div className="flex relative flex-col w-[300px] h-auto md:w-full md:max-w-none backdrop-blur-md">+ <div+ className={[+ styles.visual,+ golden ? styles['visual--gold'] : '',+ !golden && 'overflow-hidden',+ 'flex relative flex-col justify-between w-full aspect-[1/1.6] md:aspect-[1.935/1] bg-gradient-to-b from-[#ffffff80] to-[#ffffff20] before:rounded-[13px] box-border backdrop-blur-md rounded-xl',+ ].join(' ')}+ >+ {username ? (+ <div className="absolute inset-0 h-full px-4 pb-6 z-10 flex flex-col items-center justify-between w-full md:h-full flex-1 md:pb-0 md:pl-8 md:pr-[15%] overflow-hidden">+ <TicketHeader golden={golden} />+ <div className="flex-1 w-full h-full md:h-auto flex py-6 md:py-4 flex-col justify-center">+ <TicketProfile+ user={user}+ ticketGenerationState={ticketGenerationState}+ setTicketGenerationState={setTicketGenerationState}+ golden={golden}+ />+ </div>+ <TicketFooter />+ <TicketNumber number={ticketNumber} golden={golden} />+ <div className="absolute z-500 inset-[1px] overflow-hidden rounded-xl">+ <Image+ src={CURRENT_TICKET_BG}+ alt="ticket background"+ layout="fill"+ objectFit="cover"+ objectPosition="center"+ quality={100}+ />+ </div>+ </div>+ ) : (+ <TicketForm+ defaultUsername={username ?? undefined}+ setTicketGenerationState={setTicketGenerationState}+ />+ )}+ </div>+ </div>+ )+}diff --git a/apps/www/components/LaunchWeek/8/Ticket/TicketActions.tsx b/apps/www/components/LaunchWeek/8/Ticket/TicketActions.tsxnew file mode 100644index 00000000000..54d417d7188--- /dev/null+++ b/apps/www/components/LaunchWeek/8/Ticket/TicketActions.tsx@@ -0,0 +1,133 @@+import { useEffect, useRef, useState } from 'react'+import { SITE_URL, TWEET_TEXT, TWEET_TEXT_GOLDEN } from '~/lib/constants'+import { IconCheckCircle } from 'ui'+import useConfData from '~/components/LaunchWeek/hooks/use-conf-data'+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 link = `${SITE_URL}/tickets/${username}?lw=8${golden ? `&golden=true` : ''}`+ const permalink = encodeURIComponent(link)+ const text = golden ? TWEET_TEXT_GOLDEN : TWEET_TEXT+ const encodedText = encodeURIComponent(text)+ const { userData, supabase } = useConfData()+ const tweetUrl = `https://twitter.com/intent/tweet?url=${permalink}&via=supabase&text=${encodedText}`+ const linkedInUrl = `https://www.linkedin.com/sharing/share-offsite/?url=${permalink}`+ const downloadUrl = `https://obuldanrptloktxcffvn.functions.supabase.co/lw8-ticket?username=${encodeURIComponent(+ username+ )}`+ const params = useParams()+ const sharePage = params.username+ const LW_TABLE = 'lw8_tickets'++ 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])++ const handleShare = async (social: 'twitter' | 'linkedin') => {+ if (!supabase) return+ if (social === 'twitter') {+ await supabase+ .from(LW_TABLE)+ .update({ sharedOnTwitter: 'now' })+ .eq('username', username)+ .is('sharedOnTwitter', null)+ } else if (social === 'linkedin') {+ const res = await supabase+ .from(LW_TABLE)+ .update({ sharedOnLinkedIn: 'now' })+ .eq('username', username)+ .is('sharedOnLinkedIn', null)++ console.log('shareing on LinkedIn', res)+ }+ }++ return (+ <div className="grid gap-1 grid-cols-1 sm:grid-cols-3">+ {!sharePage ? (+ <>+ <div className="rounded bg-[#E6E8EB] text-scale-500 py-1 px-3 border border-[#3e3e3e] text-xs mb-1">+ <div className="flex items-center justify-center gap-2">+ <div className="text-scale-300">+ <IconCheckCircle size={10} strokeWidth={1.5} />+ </div>+ Connect with GitHub+ </div>+ </div>+ <a+ onKeyUp={() => handleShare('twitter')}+ href={tweetUrl}+ rel="noopener noreferrer prefetch"+ target="_blank"+ className={[+ `flex items-center justify-center gap-2 rounded text-scale-500 py-1 px-3 border border-[#3e3e3e] text-xs mb-1 transition-all ease-out hover:text-scale-100 hover:bg-[#dfe1e3]`,+ userData.sharedOnTwitter ? 'bg-[#E6E8EB] text-scale-500' : 'text-white',+ ].join(' ')}+ >+ {userData.sharedOnTwitter && (+ <div className="text-scale-900">+ <IconCheckCircle size={10} strokeWidth={1.5} />+ </div>+ )}+ Share on Twitter+ </a>+ <a+ onKeyUp={() => handleShare('linkedin')}+ href={linkedInUrl}+ rel="noopener noreferrer prefetch"+ target="_blank"+ className={[+ `flex items-center justify-center gap-2 rounded text-scale-500 py-1 px-3 border border-[#3e3e3e] text-xs mb-1 transition-all ease-out hover:text-scale-100 hover:bg-[#dfe1e3]`,+ userData.sharedOnLinkedIn ? 'bg-[#E6E8EB] text-scale-500' : 'text-white',+ ].join(' ')}+ >+ {userData.sharedOnLinkedIn && (+ <div className="text-scale-900">+ <IconCheckCircle size={10} strokeWidth={1.5} />+ </div>+ )}+ Share on Linkedin+ </a>+ </>+ ) : (+ !username && (+ <TicketForm+ defaultUsername={username ?? undefined}+ ticketGenerationState={ticketGenerationState}+ setTicketGenerationState={setTicketGenerationState}+ />+ )+ )}+ </div>+ )+}diff --git a/apps/www/components/LaunchWeek/8/Ticket/TicketContainer.tsx b/apps/www/components/LaunchWeek/8/Ticket/TicketContainer.tsxnew file mode 100644index 00000000000..10d2e68b269--- /dev/null+++ b/apps/www/components/LaunchWeek/8/Ticket/TicketContainer.tsx@@ -0,0 +1,181 @@+import { useState } from 'react'+import { SupabaseClient } from '@supabase/supabase-js'+import Link from 'next/link'+import cn from 'classnames'+import { Button } from 'ui'++import styles from './ticket.module.css'+import styleUtils from '../../utils.module.css'+import Ticket from './Ticket'+import TicketActions from '~/components/LaunchWeek/8/Ticket/TicketActions'+import TicketCopy from '~/components/LaunchWeek/8/Ticket/ticket-copy'+import { UserData } from '~/components/LaunchWeek/hooks/use-conf-data'+import useWinningChances from '~/components/LaunchWeek/hooks/useWinningChances'+import { SITE_URL } from '~/lib/constants'+import { useBreakpoint } from 'common/hooks/useBreakpoint'+import TicketCustomizationForm from './TicketCustomizationForm'+import TicketDisclaimer from './TicketDisclaimer'++type TicketGenerationState = 'default' | 'loading'++type Props = {+ user: UserData+ supabase: SupabaseClient+ referrals: number+ sharePage?: boolean+}++export default function TicketContainer({ user, sharePage, referrals, supabase }: Props) {+ const { username, name, golden } = user+ const isMobile = useBreakpoint(1023)+ const [ticketGenerationState, setTicketGenerationState] =+ useState<TicketGenerationState>('default')+ const winningChances = useWinningChances()++ console.log(supabase)++ if (!user.username)+ return (+ <div className="w-full flex items-center justify-center min-h-[400px]">+ <div+ className={cn(+ styles['ticket-visual'],+ styleUtils.appear,+ styleUtils['appear-first'],+ 'relative flex flex-col items-center gap-2 w-full max-w-2xl'+ )}+ >+ <Ticket+ user={user}+ ticketGenerationState={ticketGenerationState}+ setTicketGenerationState={setTicketGenerationState}+ />+ <TicketDisclaimer className="mt-4" />+ </div>+ </div>+ )++ return (+ <div+ className={[+ `relative w-full max-w-sm md:max-w-[700px] lg:max-w-[1100px] min-h-[400px] flex flex-col items-center lg:grid lg:grid-cols-12 gap-4 lg:p-4 rounded-3xl backdrop-blur lg:items-stretch h-auto`,+ !isMobile && styles['ticket-hero'],+ ].join(' ')}+ >+ <div+ className={[+ 'flex flex-col !w-full h-full justify-center max-w-lg lg:max-w-none col-span-full p-6 lg:col-span-4 rounded-3xl backdrop-blur lg:backdrop-blur-none',+ isMobile && styles['ticket-hero'],+ ].join(' ')}+ >+ <div className="text-scale-1200 flex flex-col w-full items-center text-white text-center lg:text-left lg:items-start gap-3">+ <h1 className={cn('text-2xl tracking-[-0.02rem] leading-7 block text-white')}>+ {!sharePage ? (+ name ? (+ <>+ {winningChances === 1 && (+ <>+ <span className="text-white">You're in! </span>+ Now make it unique and share.+ </>+ )}+ {winningChances === 2 && (+ <>+ <span className="text-white">That's x2!</span>+ <br className="inline lg:hidden" /> Share again to get a golden ticket.+ </>+ )}+ {winningChances === 3 && (+ <>+ You have a <span className={styles['gold-text']}>golden </span>+ chance of winning!+ </>+ )}+ </>+ ) : (+ <>+ Generate your ticket. <br />+ Win the <span className="gradient-text-purple-800">SupaKeyboard</span>.+ </>+ )+ ) : (+ <>+ {name ? name : username}'s <br className="hidden lg:inline" />+ unique ticket+ </>+ )}+ </h1>++ <div className="text-sm text-scale-1100 leading-5">+ {!sharePage ? (+ golden ? (+ <p>+ Join us on August 11th for Launch Week 8's final day and find out if you are one+ of the lucky winners.+ </p>+ ) : (+ <p>+ Customize your ticket and boost your chances of winning{' '}+ <Link href="#lw8-prizes">+ <a className="underline hover:text-scale-1200">limited edition awards</a>+ </Link>{' '}+ by sharing it with the community.+ </p>+ )+ ) : (+ <>+ <p>+ Generate and share your own custom ticket for a chance to win{' '}+ <Link href="#lw8-prizes">+ <a className="underline hover:text-scale-1200">awesome swag</a>+ </Link>+ .+ </p>++ <Button type="secondary" asChild>+ <a+ href={`${SITE_URL}/${username ? '?referral=' + username : ''}`}+ className="w-full mt-4 lg:mt-8"+ >+ Join Launch Week 8+ </a>+ </Button>+ </>+ )}+ </div>++ {!sharePage && user.username && (+ <TicketCustomizationForm user={user} supabase={supabase} />+ )}+ </div>+ </div>+ <div className="w-full flex-1 col-span-8 lg:-mt-12">+ <div+ className={cn(+ styles['ticket-visual'],+ styleUtils.appear,+ styleUtils['appear-first'],+ 'relative flex flex-col items-center gap-4 w-full'+ )}+ >+ <Ticket+ user={user}+ ticketGenerationState={ticketGenerationState}+ setTicketGenerationState={setTicketGenerationState}+ />+ {username && (+ <div className="w-full">+ <TicketActions+ username={username}+ golden={golden}+ ticketGenerationState={ticketGenerationState}+ setTicketGenerationState={setTicketGenerationState}+ />+ <TicketCopy username={username} isGolden={golden} />+ </div>+ )}+ </div>+ </div>+ </div>+ )+}diff --git a/apps/www/components/LaunchWeek/8/Ticket/TicketCustomizationForm.tsx b/apps/www/components/LaunchWeek/8/Ticket/TicketCustomizationForm.tsxnew file mode 100644index 00000000000..dd9aa9e243c--- /dev/null+++ b/apps/www/components/LaunchWeek/8/Ticket/TicketCustomizationForm.tsx@@ -0,0 +1,147 @@+import React, { useState } from 'react'+import { Badge, IconCheck, Input } from 'ui'+import { UserData } from '../../hooks/use-conf-data'+import { SupabaseClient } from '@supabase/supabase-js'+import { useDebounce } from 'common'++interface Props {+ supabase: SupabaseClient+ user: UserData+}++const TicketCustomizationForm = ({ supabase, user }: Props) => {+ const defaultFormValues = {+ role: user.metadata?.role,+ company: user.metadata?.company,+ location: user.metadata?.location,+ }+ const [formData, setFormData] = useState(defaultFormValues)+ const [formState, setFormState] = useState<'idle' | 'saved' | 'saving' | 'error'>('idle')+ const IS_SAVING = formState === 'saving'+ const IS_SAVED = formState === 'saved'+ const HAS_ERROR = formState === 'error'++ const handleInputChange = (name: string, value: string) => {+ setFormData((prev) => ({ ...prev, [name]: value }))+ }++ const handleFormSubmit = async () => {+ setFormState('saving')+ const payload = { metadata: formData }++ if (supabase) {+ await supabase+ .from('lw8_tickets')+ .update(payload)+ .eq('username', user.username)+ .then((res) => {+ if (res.error) return setFormState('error')+ setFormState('saved')+ setTimeout(() => {+ setFormState('idle')+ }, 1800)+ })+ }+ }++ const debouncedChangeHandler = useDebounce(handleFormSubmit, 1200)++ return (+ <form className="w-full flex flex-col gap-2 mt-4" onChange={() => debouncedChangeHandler()}>+ <div className="flex items-center justify-between">+ {!IS_SAVED && !HAS_ERROR && (+ <span className="opacity-0 animate-fade-in text-scale-1000 text-xs">+ Connected account+ </span>+ )}+ {IS_SAVED && (+ <span className="opacity-0 animate-fade-in text-xs text-brand-900">Saved</span>+ )}+ {HAS_ERROR && (+ <span className="opacity-0 animate-fade-in text-xs text-tomato-900">+ Something went wrong+ </span>+ )}+ <Badge color="brand">@{user.username}</Badge>+ </div>+ <Input+ className="[&_input]:border-scale-200"+ size="small"+ type="text"+ required+ disabled+ placeholder="name"+ value={user.name}+ icon={<IconCheck strokeWidth={2} className="w-3 text-brand-900" />}+ />+ <Input+ className="[&_input]:border-scale-200"+ size="small"+ type="text"+ placeholder="role (optional)"+ value={formData.role}+ onChange={(event) => {+ handleInputChange('role', event.target.value)+ }}+ disabled={IS_SAVING}+ maxLength={30}+ icon={+ <IconCheck+ strokeWidth={2}+ className={[+ 'w-3',+ IS_SAVING && 'text-scale-300',+ !!formData.role ? 'text-brand-900' : 'text-scale-300',+ ].join(' ')}+ />+ }+ />+ <Input+ className="[&_input]:border-scale-200"+ size="small"+ type="text"+ placeholder="company (optional)"+ value={formData.company}+ maxLength={30}+ onChange={(event) => {+ handleInputChange('company', event.target.value)+ }}+ disabled={IS_SAVING}+ icon={+ <IconCheck+ strokeWidth={2}+ className={[+ 'w-3',+ IS_SAVING && 'text-scale-300',+ !!formData.company ? 'text-brand-900' : 'text-scale-300',+ ].join(' ')}+ />+ }+ />+ <Input+ className="[&_input]:border-scale-200"+ size="small"+ type="text"+ placeholder="location (optional)"+ value={formData.location}+ onChange={(event) => {+ handleInputChange('location', event.target.value)+ }}+ disabled={IS_SAVING}+ maxLength={20}+ icon={+ <IconCheck+ strokeWidth={2}+ className={[+ 'w-3 flex spin',+ IS_SAVING && 'text-scale-300',+ !!formData.location ? 'text-brand-900' : 'text-scale-300',+ ].join(' ')}+ />+ }+ />+ </form>+ )+}++export default TicketCustomizationFormdiff --git a/apps/www/components/LaunchWeek/8/Ticket/TicketDisclaimer.tsx b/apps/www/components/LaunchWeek/8/Ticket/TicketDisclaimer.tsxnew file mode 100644index 00000000000..e23e77804e2--- /dev/null+++ b/apps/www/components/LaunchWeek/8/Ticket/TicketDisclaimer.tsx@@ -0,0 +1,7 @@+const TicketDisclaimer = ({ className, children }: { className?: string; children?: any }) => (+ <p className={['text-sm text-center text-[#9296AA90]', className].join(' ')}>+ {children || 'By registering you accept to receive email updates on Supabase Launch Week.'}+ </p>+)++export default TicketDisclaimerdiff --git a/apps/www/components/LaunchWeek/8/Ticket/TicketFooter.tsx b/apps/www/components/LaunchWeek/8/Ticket/TicketFooter.tsxnew file mode 100644index 00000000000..ebffc62ecf2--- /dev/null+++ b/apps/www/components/LaunchWeek/8/Ticket/TicketFooter.tsx@@ -0,0 +1,13 @@+import React from 'react'+import { LW8_DATE } from '~/lib/constants'++interface Props {}++export default function TicketFooter({}: Props) {+ return (+ <div className="relative z-10 w-full flex flex-col md:flex-row gap-4 md:gap-8 mb-4 md:mb-6 text-scale-1100 text-xs font-mono uppercase tracking-widest">+ <span>{LW8_DATE}</span>+ <span>supabase.com/launch-week</span>+ </div>+ )+}diff --git a/apps/www/components/LaunchWeek/8/Ticket/TicketForm.tsx b/apps/www/components/LaunchWeek/8/Ticket/TicketForm.tsxnew file mode 100644index 00000000000..51a1b7bcb41--- /dev/null+++ b/apps/www/components/LaunchWeek/8/Ticket/TicketForm.tsx@@ -0,0 +1,169 @@+import { useState, useRef, useEffect } from 'react'+import { useRouter } from 'next/router'+import cn from 'classnames'+import { SITE_ORIGIN } from '~/lib/constants'+import useConfData from '~/components/LaunchWeek/hooks/use-conf-data'+import formStyles from './form.module.css'+import ticketFormStyles from './ticket-form.module.css'+import { Button, IconCheckCircle, IconLoader } from 'ui'++type FormState = 'default' | 'loading' | 'error'+type TicketGenerationState = 'default' | 'loading'++type Props = {+ defaultUsername?: string+ ticketGenerationState?: TicketGenerationState+ setTicketGenerationState: any+}++export default function TicketForm({ defaultUsername = '', setTicketGenerationState }: Props) {+ const [username, setUsername] = useState(defaultUsername)+ const [formState, setFormState] = useState<FormState>('default')+ const [errorMsg] = useState('')+ const { supabase, session, setUserData, setPageState, userData } = useConfData()+ const [realtimeChannel, setRealtimeChannel] = useState<ReturnType<+ (typeof supabase)['channel']+ > | null>(null)+ const formRef = useRef<HTMLFormElement>(null)+ const router = useRouter()++ useEffect(() => {+ if (supabase && session?.user && !userData.id) {+ document.body.classList.add('ticket-generated')+ const username = session.user.user_metadata.user_name+ setUsername(username)+ const name = session.user.user_metadata.full_name+ const email = session.user.email+ supabase+ .from('lw8_tickets')+ .insert({ email, name, username, referred_by: router.query?.referral ?? null })+ .eq('email', email)+ .select()+ .single()+ .then(async ({ error }: any) => {+ // If error because of duplicate email, ignore and proceed, otherwise sign out.+ if (error && error?.code !== '23505') return supabase.auth.signOut()+ const { data } = await supabase+ .from('lw8_tickets_golden')+ .select('*')+ .eq('username', username)+ .single()+ if (data) {+ setUserData(data)+ }+ setFormState('default')++ // Prefetch GitHub avatar+ new Image().src = `https://github.com/${username}.png`++ // Prefetch the twitter share URL to eagerly generate the page+ fetch(`/launch-week/tickets/${username}`).catch((_) => {})++ setPageState('ticket')++ // Listen to realtime changes+ if (!realtimeChannel && !data?.golden) {+ const channel = supabase+ .channel('changes')+ .on(+ 'postgres_changes',+ {+ event: 'UPDATE',+ schema: 'public',+ table: 'lw8_tickets',+ filter: `username=eq.${username}`,+ },+ (payload: any) => {+ const golden = !!payload.new.sharedOnTwitter && !!payload.new.sharedOnLinkedIn+ setUserData({+ ...payload.new,+ golden,+ })+ if (golden) {+ channel.unsubscribe()+ }+ }+ )+ .subscribe()+ setRealtimeChannel(channel)+ }+ })+ }+ return () => {+ // Cleanup realtime subscription on unmount+ realtimeChannel?.unsubscribe()+ }+ }, [session])++ return formState === 'error' ? (+ <div className="h-full">+ <div className={cn(formStyles['form-row'], ticketFormStyles['form-row'])}>+ <div className={cn(formStyles['input-label'], formStyles.error)}>+ <div className={cn(formStyles.input, formStyles['input-text'])}>{errorMsg}</div>+ <button+ type="button"+ className={cn(formStyles.submit, formStyles.error)}+ onClick={() => {+ setFormState('default')+ setTicketGenerationState('default')+ }}+ >+ Try Again+ </button>+ </div>+ </div>+ </div>+ ) : (+ <form+ ref={formRef}+ onSubmit={async (e) => {+ e.preventDefault()++ if (formState !== 'default') {+ setTicketGenerationState('default')+ setFormState('default')+ return+ }++ setFormState('loading')+ setTicketGenerationState('loading')++ await supabase.auth.signInWithOAuth({+ provider: 'github',+ options: {+ redirectTo: `${SITE_ORIGIN}/launch-week/${+ userData.username ? '?referral=' + userData.username : ''+ }`,+ },+ })+ }}+ className="flex flex-col h-full items-center justify-center relative z-20"+ >+ <div className="flex flex-col gap-3">+ <div>+ <Button+ type="secondary"+ htmlType="submit"+ disabled={formState === 'loading' || Boolean(session)}+ >+ <span className={`flex items-center gap-2 ${username && 'text-scale-900'}`}>+ {session ? (+ <>+ <IconCheckCircle />+ Connect with GitHub+ </>+ ) : (+ <span className="flex items-center gap-2">+ {formState === 'loading' && <IconLoader size={14} className="animate-spin" />}+ Connect with GitHub+ </span>+ )}+ </span>+ {session ? <span className={ticketFormStyles.checkIcon}></span> : null}+ </Button>+ </div>+ {/* {!session && <p className={'text-xs text-scale-900'}>Only public info will be used.</p>} */}+ </div>+ </form>+ )+}diff --git a/apps/www/components/LaunchWeek/8/Ticket/TicketHeader.tsx b/apps/www/components/LaunchWeek/8/Ticket/TicketHeader.tsxnew file mode 100644index 00000000000..217cf6a38bb--- /dev/null+++ b/apps/www/components/LaunchWeek/8/Ticket/TicketHeader.tsx@@ -0,0 +1,20 @@+import Image from 'next/image'+import React from 'react'++interface Props {+ golden?: boolean+}++export default function TicketHeader({ golden = false }: Props) {+ return (+ <div className="relative z-10 w-full flex mt-4 md:mt-6 h-10">+ <Image+ src={`/images/launchweek/8/lw8-logo${golden ? '-gold' : ''}.png`}+ alt="Launch Week 8 logo"+ layout="fill"+ objectFit="contain"+ objectPosition="left"+ />+ </div>+ )+}diff --git a/apps/www/components/LaunchWeek/8/Ticket/TicketNumber.tsx b/apps/www/components/LaunchWeek/8/Ticket/TicketNumber.tsxnew file mode 100644index 00000000000..d7348a6b545--- /dev/null+++ b/apps/www/components/LaunchWeek/8/Ticket/TicketNumber.tsx@@ -0,0 +1,31 @@+import styles from './ticket.module.css'++type Props = {+ number: number | undefined+ golden?: boolean+}++export default function TicketNumber({ number, golden = false }: Props) {+ const numDigits = `${number}`.length+ const prefix = `00000000`.slice(numDigits)+ const ticketNumberText = `NO ${prefix}${number}`++ return (+ <>+ <div className="z-10 mt-2 md:mt-0 md:absolute md:flex inset-0 items-center justify-center top-auto md:left-auto md:right-0 md:top-0 md:w-[90px] md:h-100% dark:text-white">+ <span+ className={[+ `+ md:absolute text-[16px] md:text-[22px] w-full px-2 py-8 md:w-[max-content] leading-[1]+ md:transform md:-rotate-90 md:origin-center+ text-scale-1100 text-center font-mono tracking-[0.8rem]+ `,+ golden ? styles['ticket-number-gold'] : styles['ticket-number'],+ ].join(' ')}+ >+ {ticketNumberText}+ </span>+ </div>+ </>+ )+}diff --git a/apps/www/components/LaunchWeek/8/Ticket/TicketProfile.tsx b/apps/www/components/LaunchWeek/8/Ticket/TicketProfile.tsxnew file mode 100644index 00000000000..e1cacdff171--- /dev/null+++ b/apps/www/components/LaunchWeek/8/Ticket/TicketProfile.tsx@@ -0,0 +1,42 @@+import { UserData } from '../../hooks/use-conf-data'++type TicketGenerationState = 'default' | 'loading'+type Props = {+ user: UserData+ ticketGenerationState?: TicketGenerationState+ setTicketGenerationState?: (ticketGenerationState: TicketGenerationState) => void+ golden?: boolean+}++export default function TicketProfile({ user, ticketGenerationState, golden = false }: Props) {+ const { username, name, metadata } = user++ const HAS_ROLE = !!metadata?.role+ const HAS_COMPANY = !!metadata?.company+ const HAS_LOCATION = !!metadata?.location+ const HAS_NO_META = !HAS_ROLE && !HAS_COMPANY && !HAS_LOCATION++ return (+ <div className="relative z-10 flex gap-4 items-center px-2">+ <div className="text-scale-1100 text-sm md:text-base flex flex-col gap-2">+ <p className="text-3xl sm:text-4xl">{name || username || 'Your Name'}</p>+ {HAS_NO_META && username && <p>@{username}</p>}+ <div>+ {HAS_ROLE && <span>{metadata?.role}</span>}+ {HAS_COMPANY && (+ <span>+ {HAS_ROLE && ' '}+ <span>at</span> {metadata?.company}+ </span>+ )}+ {HAS_LOCATION && (+ <span>+ {' '}+ {(HAS_ROLE || HAS_COMPANY) && '—'} {metadata?.location}+ </span>+ )}+ </div>+ </div>+ </div>+ )+}diff --git a/apps/www/components/LaunchWeek/8/Ticket/form.module.css b/apps/www/components/LaunchWeek/8/Ticket/form.module.cssnew file mode 100644index 00000000000..5b6a078561b--- /dev/null+++ b/apps/www/components/LaunchWeek/8/Ticket/form.module.css@@ -0,0 +1,244 @@+/* .form {+ display: flex;+ justify-content: center;+ align-items: center;+ flex-direction: column;+ margin-bottom: 12px;+ gap: 12px;+} */++/* .formLeft {+ align-items: center;+}+.formCenter {+ align-items: center;+} */++/* @media (min-width: 1200px) {+ .formLeft {+ align-items: start;+ }+ .formCenter {+ align-items: center;+ }+} */+/*+.formInfo {+ max-width: 520px;+} */++.formInfo h3 {+ font-size: 1.25em;+ font-weight: 400;+}++.formInfo p {+ font-size: 1.1em;+ line-height: 1.4;+ margin-bottom: 32px;+ color: var(--lw-secondary-color);+}++@media (min-width: 1200px) {+ /* .form.share-page {+ justify-content: flex-start;+ } */+}++/* .formInfoLeft {+ text-align: center;+}+.formInfoCenter {+ text-align: center;+ margin: 0 auto;+} */++@media (min-width: 1200px) {+ .formInfoLeft {+ text-align: left;+ }+ .formInfoCenter {+ text-align: center;+ margin: 0 auto;+ }+}++.input {+ border: none;+ width: 100%;+ background: transparent;+ outline: none;+ height: 56px;+ padding-left: 15px;+ padding-right: 15px;+ font-size: var(--text-md);+ color: #fff;+ font-family: inherit;+}++@media (min-width: 768px) {+ .input {+ width: calc(100% - var(--space-32x));+ padding-right: 0;+ }+}++.input::placeholder {+ color: var(--lw-secondary-color);+}++.input-label {+ background-color: var(--gray);+ border-radius: var(--space-2x);+ border: 1px solid transparent;+ transition: border-color 0.2s ease, background-color 0.2s ease;+ display: block;+}++.input-label.focused {+ background-color: #33373c;+}++.input-label.error {+ background: red;+}++.input-label.success {+ background: #0070f3;+}++.input-text {+ display: flex;+ align-items: center;+ width: 100%;+}++.form-row {+ position: relative;+ max-width: 400px;+ width: 100%;+}++@media (min-width: 768px) {+ .form-row {+ max-width: 480px;+ }+}++.submit {+ width: 100%;+ height: 56px;+ margin-top: var(--space-4x);+ border-radius: var(--space-2x);+ border: 1px solid var(--brand);+ background: var(--brand);+ cursor: pointer;+ font-family: inherit;+ font-size: var(--text-md);+ letter-spacing: -0.02em;+ outline: none;+ font-weight: 500;+ color: white;+ transition: background-color 0.2s ease, color 0.2s ease;+ display: inline-flex;+ align-items: center;+ justify-content: center;+}++.submit.generate-with-github {+ display: flex;+ margin-bottom: 12px;+ position: relative;+}++@media (min-width: 768px) {+ .submit.register {+ width: 120px;+ height: 40px;+ margin-top: 0;+ position: absolute;+ border-radius: 5px;+ right: var(--space-2x);+ top: var(--space-2x);+ }+}++.submit.loading {+ cursor: default;+}++.submit.default:hover,+.submit.default:focus {+ background: black;+ color: var(--brand);+}++.submit.default.generate-with-github:hover path,+.submit.default.generate-with-github:focus path {+ fill: var(--brand);+}++.submit.error:hover,+.submit.error:focus {+ background: #000;+ color: #fff;+}++.submit.default:disabled,+.submit.default:disabled:hover,+.submit.default:disabled:focus {+ cursor: default;+ background: var(--gray);+ border-color: var(--gray);+ color: #fff;+ justify-content: flex-start;+ overflow: hidden;+}++.submit.default.generate-with-github:disabled path,+.submit.default.generate-with-github:disabled:hover path,+.submit.default.generate-with-github:disabled:focus path {+ fill: #fff;+}++.submit.default.generate-with-github.not-allowed:disabled {+ cursor: not-allowed;+}++@media (min-width: 1200px) {+ .form-row {+ margin: 0;+ }++ .submit.generate-with-github {+ width: 240px;+ }+}++.stage-btn {+ background: #323332;+ border: 2px solid #34b27b;+}++.github-wrapper {+ display: flex;+ align-items: center;+ flex-direction: column;+}++.or-divider {+ width: 100%;+ text-align: center;+ color: var(--lw-secondary-color);+ margin: var(--space-4x) 0;+}++@media (min-width: 1200px) {+ .github-wrapper {+ flex-direction: row;+ }+ .or-divider {+ width: 240px;+ margin: 0;+ }+}diff --git a/apps/www/components/LaunchWeek/8/Ticket/ticket-actions.module.css b/apps/www/components/LaunchWeek/8/Ticket/ticket-actions.module.cssnew file mode 100644index 00000000000..d13c42418d7--- /dev/null+++ b/apps/www/components/LaunchWeek/8/Ticket/ticket-actions.module.css@@ -0,0 +1,70 @@+.button {+ border-radius: var(--space-2x);+ border: 1px solid #fff;+ color: #000;+ background: #fff;+ cursor: pointer;+ font-family: inherit;+ font-size: var(--text-md);+ letter-spacing: -0.02em;+ font-weight: 500;+ outline: none;+ transition: background-color 0.2s ease;+ display: grid;+ grid-template-columns: 24px 1fr;+ text-align: center;+ align-items: center;+ padding: 0 var(--space-4x);+ height: 55px;+ width: 100%;+ max-width: 400px;+ margin: var(--space-2x) auto;+}++.loading {+ grid-template-columns: 1fr;+ justify-items: center;+}++@media (min-width: 768px) {+ .button {+ width: 200px;+ margin: 0 6px;+ }+}++.button:hover,+.button:focus {+ background: black;+ color: #fff;+}++.first {+ animation-delay: 2s;+}+.second {+ animation-delay: 2.2s;+}+.third {+ animation-delay: 2.4s;+}++:global(.ticket-generated) .first {+ animation-delay: 0.6s;+}+:global(.ticket-generated) .second {+ animation-delay: 0.8s;+}+:global(.ticket-generated) .third {+ animation-delay: 1s;+}++.linkedin-button {+ display: none !important;+}++@media (min-width: 768px) {+ .linkedin-button {+ display: grid !important;+ }+}diff --git a/apps/www/components/LaunchWeek/8/Ticket/ticket-copy.module.css b/apps/www/components/LaunchWeek/8/Ticket/ticket-copy.module.cssnew file mode 100644index 00000000000..65007c67559--- /dev/null+++ b/apps/www/components/LaunchWeek/8/Ticket/ticket-copy.module.css@@ -0,0 +1,190 @@+.wrapper {+ color: var(--lw-secondary-color);+ display: flex;+ align-items: center;+ justify-content: center;+ animation-delay: 2.6s;+ flex-direction: column;+}++:global(.ticket-generated) .wrapper {+ animation-delay: 1.2s;+}++.label {+ width: 100%;+ margin-bottom: var(--space-2x);+}++.label-wrapper {+ display: flex;+ align-items: center;+ max-width: 400px;+ width: 100%;+ justify-content: space-between;+}++@media (min-width: 768px) {+ .wrapper {+ flex-direction: row;+ }++ .label {+ width: auto;+ margin-right: 10px;+ margin-bottom: 0px;+ }++ .label-wrapper {+ width: auto;+ }+}++.field {+ position: relative;+ border-radius: var(--space-2x);+ overflow: hidden;+ background: var(--gray);+}++@media (min-width: 768px) {+ .field {+ padding-right: 50px;+ }+ .field.desktop-copy-disabled {+ padding-right: 0px;+ }+}++.mobile-copy {+ margin-bottom: 10px;+ display: flex;+}++.mobile-copy-disabled.mobile-copy-disabled {+ display: none;+}++.mobile-copy * {+ color: var(--lw-secondary-color);+ transition: color 0.2s ease;+}++.mobile-copy:hover * {+ color: #fff;+ transition: color 0.2s ease;+}++.field * {+ color: var(--lw-secondary-color);+ transition: color 0.2s ease;+}++.field:hover * {+ color: #fff;+ transition: color 0.2s ease;+}++.url {+ width: calc(100vw - 36px);+ user-select: all;+ overflow-x: scroll;+ white-space: nowrap;+ display: block;++ padding: var(--space-2x) 14px;+ -ms-overflow-style: none; /* IE and Edge */+ scrollbar-width: none; /* Firefox */+}++@media (min-width: 436px) {+ .url {+ width: 400px;+ }+}++@media (min-width: 768px) {+ .url {+ width: 400px;+ }+ .mobile-copy {+ margin-bottom: 0;+ display: none;+ }+}++.url::-webkit-scrollbar {+ display: none;+}++/* .fade {+ position: absolute;+ background: linear-gradient(90deg, rgba(37, 39, 41, 0%) 0%, #252729 100%);+ top: 0;+ bottom: 0;+ right: 0px;+ width: 50px;+ z-index: 1;+ display: block;+ border-radius: var(--space-2x);+ pointer-events: none;+} */++.desktop-copy.desktop-copy-disabled {+ display: none;+}++@media (min-width: 768px) {+ .fade {+ right: 50px;+ }+ .fade.desktop-copy-disabled {+ right: 0px;+ }+}++.copied {+ display: flex;+ z-index: 2;+ align-items: center;+ justify-content: flex-end;+ opacity: 0;+ transition: opacity 0.2s ease !important;+}++.copied.visible {+ opacity: 1;+}++.copy-button {+ background: none;+ outline: none;+ border: none;+ cursor: pointer;+ z-index: 2;+ border-radius: var(--space-2x);+ width: 40px;+ display: flex;+ align-items: center;+ justify-content: center;+ margin-right: -10px;+}++@media (min-width: 768px) {+ .copied {+ position: absolute;+ right: 50px;+ top: 0px;+ bottom: 0px;+ background: linear-gradient(90deg, rgba(37, 39, 41, 0%) 0px, #252729 40px);+ padding-left: 50px;+ }+ .copy-button {+ position: absolute;+ top: 0px;+ right: 0px;+ bottom: 0px;+ margin-right: 0px;+ width: 50px;+ }+}diff --git a/apps/www/components/LaunchWeek/8/Ticket/ticket-copy.tsx b/apps/www/components/LaunchWeek/8/Ticket/ticket-copy.tsxnew file mode 100644index 00000000000..65e700c6730--- /dev/null+++ b/apps/www/components/LaunchWeek/8/Ticket/ticket-copy.tsx@@ -0,0 +1,85 @@+import { useEffect, useState, useRef } from 'react'+import cn from 'classnames'+import { SITE_URL } from '~/lib/constants'+import styleUtils from '../../utils.module.css'+import { IconCopy, IconCheck } from 'ui'++type Props = {+ username: string+ isGolden?: boolean+}++export default function TicketCopy({ username, isGolden }: Props) {+ const [fadeOpacity, setFadeOpacity] = useState(1)+ const [scrolling, setScrolling] = useState(false)+ const [copyEnabled, setCopyEnabled] = useState(false)+ const [copied, setCopied] = useState(false)+ const scrollRef = useRef<HTMLParagraphElement>(null)+ const buttonRef = useRef<HTMLButtonElement>(null)+ const url = `${SITE_URL}/tickets/${username}?lw=8${isGolden ? `&golden=true` : ''}`+ useEffect(() => {+ if (navigator.clipboard) {+ setCopyEnabled(true)+ }+ }, [])++ return (+ <div+ className={cn(styleUtils.appear, styleUtils['appear-second'], 'h-8 w-full overflow-hidden')}+ >+ <button+ type="button"+ name="Copy"+ ref={buttonRef}+ onClick={() => {+ navigator.clipboard.writeText(url).then(() => {+ setCopied(true)+ setTimeout(() => {+ setCopied(false)+ }, 2000)+ })+ }}+ className="h-full flex items-center gap-3 w-full truncate relative pr-20 text-scale-1100 hover:text-scale-1200"+ >+ <div className="flex items-center truncate">+ <p+ className={['text-xs truncate'].join(' ')}+ ref={scrollRef}+ onScroll={() => {+ if (!scrolling) {+ setScrolling(true)+ const animationFrame = requestAnimationFrame(() => {+ const scrollableWidth =+ (scrollRef.current?.scrollWidth || 0) - (scrollRef.current?.clientWidth || 0)+ setFadeOpacity(+ (scrollableWidth - (scrollRef.current?.scrollLeft || 0)) /+ (scrollableWidth || 1)+ )+ cancelAnimationFrame(animationFrame)+ setScrolling(false)+ })+ }+ }}+ >+ {url}+ </p>+ </div>+ <div className="absolute right-0 with-auto height-auto flex items-center">+ <div className="bg-[#E6E8EB] text-[#2e2e2e] text-xs flex items-center cursor-pointer py-1 px-2 rounded">+ <div className="flex items-center gap-1">+ {copied ? (+ <>+ <IconCheck size={14} strokeWidth={1.5} /> Copied!+ </>+ ) : (+ <>+ <IconCopy size={14} strokeWidth={1.5} /> Copy+ </>+ )}+ </div>+ </div>+ </div>+ </button>+ </div>+ )+}diff --git a/apps/www/components/LaunchWeek/8/Ticket/ticket-form.module.css b/apps/www/components/LaunchWeek/8/Ticket/ticket-form.module.cssnew file mode 100644index 00000000000..d10b43a0284--- /dev/null+++ b/apps/www/components/LaunchWeek/8/Ticket/ticket-form.module.css@@ -0,0 +1,65 @@+.githubIcon {+ margin-left: 12px;+ margin-right: var(--space-4x);+ display: inline-flex;+}++.checkIcon {+ position: absolute;+ right: var(--space-4x);+ display: inline-flex;+}++.generateWithGithub {+ display: flex;+ align-items: center;+ font-weight: 500;+}++.stageIcon {+ position: absolute;+ left: var(--space-4x);+ display: inline-flex;+}++.form-row {+ margin-left: auto;+ margin-right: auto;+ max-width: 600px;+}++.description {+ color: var(--secondary-color);+ margin: 0;+ text-align: center;+ margin-left: var(--space-4x);+}++@media (min-width: 768px) {+ .form-row {+ margin-bottom: 20px;+ }+}++@media (min-width: 1200px) {+ .form-row {+ margin: 0;+ }++ .description {+ text-align: left;+ }++ .generateWithGithub {+ width: 100%;+ }+}++.learn-more {+ color: #fff;+}++.learn-more:hover {+ text-decoration: underline;+ color: #fff;+}diff --git a/apps/www/components/LaunchWeek/8/Ticket/ticket-profile.module.css b/apps/www/components/LaunchWeek/8/Ticket/ticket-profile.module.cssnew file mode 100644index 00000000000..ac08447a22a--- /dev/null+++ b/apps/www/components/LaunchWeek/8/Ticket/ticket-profile.module.css@@ -0,0 +1,149 @@+.image {+ width: 50px;+ height: 50px;+ border-radius: 50%;+ border: 1px solid #999;+}++@media (min-width: 768px) {+ .image {+ width: calc(100px * var(--size));+ height: calc(100px * var(--size));+ }+}++.name {+ font-size: 24px;+ display: inline-block;+ line-height: 1.15;+ letter-spacing: -0.02em;+ margin: 0;+}++.name-golden {+ color: var(--gold-primary);+}++@media (min-width: 768px) {+ .name {+ font-size: calc(var(--space-8x) * var(--size));+ margin-bottom: 5px;+ }+}++.username {+ display: inline-block;+ font-size: calc(1em * var(--size));+ color: var(--lw-secondary-color);+ display: flex;+ align-items: center;+ margin: 0;+}++.username-golden {+ color: var(--gold-secondary);+}++.githubIcon {+ margin-right: calc(5px * var(--size));+ display: inline-flex;+}++.githubIcon-golden svg {+ color: var(--gold-secondary);+ opacity: 0.5;+}++.empty-icon {+ display: block;+ background: linear-gradient(320deg, #121212, #191919);+ width: 60px;+}++.empty-icon--golden {+ display: block;+ background: linear-gradient(90deg, #fff9eb, #e2ba52);+ width: 60px;+ border: 1px solid #ecc154ad;+}++@media (min-width: 768px) {+ .empty-icon {+ width: calc(80px * var(--size));+ }++ .empty-icon--golden {+ width: calc(80px * var(--size));+ }+}++@keyframes loading {+ 0% {+ background-position: 200% 0;+ }+ 100% {+ background-position: -200% 0;+ }+}+/*+.skeleton {+ display: flex;+ align-items: center;+ border-radius: 25px;+} */++.skeleton.loaded {+ width: unset !important;+}++.skeleton:not(.wrapper):not(.show) {+ display: none;+}++.wrapper:not(.show)::before {+ content: none;+}++.skeleton:not(.wrapper):not(.loaded) {+ border-radius: var(--space);+ background-image: linear-gradient(270deg, #252729, #34383d, #34383d, #252729);+ background-size: 200% 100%;+ animation: loading 2s ease-in-out infinite;+}++.wrapper {+ position: relative;+}++.wrapper::before {+ content: '';+ position: absolute;+ top: -1px;+ left: -1px;+ right: 0;+ bottom: 0;+ border-radius: var(--space);+ z-index: 100;+ background-image: linear-gradient(270deg, #111111, #333333, #333333, #111111);+ background-size: 200% 100%;+ animation: loading 2s ease-in-out infinite;+}++.inline {+ display: inline-block !important;+}++.rounded,+.rounded.wrapper::before {+ width: calc(80px * var(--size));+ height: calc(80px * var(--size));+ border-radius: 50% !important;+}++@media (min-width: 768px) {+ .rounded,+ .rounded.wrapper::before {+ width: calc(110px * var(--size));+ height: calc(110px * var(--size));+ }+}diff --git a/apps/www/components/LaunchWeek/8/Ticket/ticket-visual.module.css b/apps/www/components/LaunchWeek/8/Ticket/ticket-visual.module.cssnew file mode 100644index 00000000000..f399e967aa1--- /dev/null+++ b/apps/www/components/LaunchWeek/8/Ticket/ticket-visual.module.css@@ -0,0 +1,70 @@+.visual {+ /* transform: translateZ(0); */+ background: linear-gradient(+ 30deg,+ hsla(274, 100%, 77%, 0.05) 0%,+ hsla(200, 43%, 1%, 0.2) 30%,+ hsla(200, 43%, 1%, 0.2) 70%,+ hsla(151, 50%, 53%, 0.1) 100%+ ),+ hsla(200, 43%, 1%, 0.8);+ /* background: hsla(200, 43%, 1%, 0.2); */+ box-shadow: 0px 1px 27px rgba(158, 68, 239, 0.06),+ /* 0 0 0 1px rgba(121, 89, 134, 0.25), */ 0 10px 20px 0px rgba(20, 17, 21, 0.8),+ inset 0 0.2px 1px 0.2px rgba(214, 210, 210, 0.4),+ inset -0.4px -0.4px 1px -0.3px rgba(74, 252, 175, 0.4);+ /* border: 1px solid rgba(0, 0, 0, 0.05); */+ /* border-radius: 16px; */++ -webkit-backdrop-filter: blur(2px);+ backdrop-filter: blur(2px);++ /* border: 1px solid #1c1c1c; */+ /* animation: 2s ease-in-out infinite alternate; */++ background-repeat: no-repeat;+ background-size: contain;+}++.visual--gold {+ background: radial-gradient(#fcdf9d50, #dbb33340);+}++.visual--gold::before {+ content: ' ';+ position: absolute;+ inset: 0;+ filter: drop-shadow(0 0 60px #fcdf9d);+ background: radial-gradient(#fcdf9d50, #dbb33320);+ /* border: 1px solid #dbb33320; */+}++@keyframes opacity-pulse {+ from {+ opacity: 0.5;+ }++ to {+ opacity: 1;+ }+}++@keyframes svg-shadow {+ from {+ filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 4px #d99f0c) drop-shadow(0 0 6px #d99f0c);+ }++ to {+ filter: drop-shadow(0 0 10px #fff) drop-shadow(0 0 6px #d99f0c) drop-shadow(0 0 9px #d99f0c);+ }+}++@keyframes blank-svg-shadow {+ from {+ filter: drop-shadow(0 0 2px #bada55) drop-shadow(0 0 2px #bada55) drop-shadow(0 0 2px #bada55);+ }++ to {+ filter: drop-shadow(0 0 3px #bada55) drop-shadow(0 0 2px #bada55) drop-shadow(0 0 2px #bada55);+ }+}diff --git a/apps/www/components/LaunchWeek/8/Ticket/ticket.module.css b/apps/www/components/LaunchWeek/8/Ticket/ticket.module.cssnew file mode 100644index 00000000000..51d423c3b22--- /dev/null+++ b/apps/www/components/LaunchWeek/8/Ticket/ticket.module.css@@ -0,0 +1,150 @@+.ticket-hero {+ background: linear-gradient(137.46deg, rgba(125, 196, 176, 0.04) 0%, rgba(255, 255, 255, 0) 100%),+ linear-gradient(137.46deg, rgba(255, 255, 255, 0) 6.19%, rgba(255, 255, 255, 0) 103.29%);+ z-index: 10;+ box-shadow: 0 1px 1px rgba(131, 6, 184, 0.1), 0 1px 1px rgba(128, 6, 184, 0.1),+ 0 20px 30px -30px rgba(76, 195, 138, 0.05), 0 80px 40px -40px rgba(128, 6, 184, 0.04),+ inset 0.25px 0.3px 0px 0.3px rgba(209, 243, 227, 0.1),+ inset 0.25px 0.3px 0px 0.3px rgba(76, 195, 138, 0.02),+ inset 0 -3px 0 -2px rgba(255, 255, 255, 0.08), 0px 4px 20px rgba(118, 7, 170, 0.1);+}++.hero {+ line-height: 1.15;+ letter-spacing: -0.05em;+ font-weight: 400;+ margin: 0;+ text-align: center;+}++@media (min-width: 768px) {+ .hero {+ line-height: 1;+ }+}++.description {+ font-size: 20px;+ line-height: 1.4;+ color: var(--lw-secondary-color);+ text-align: center;+ margin: 30px auto;+ max-width: 350px;+}++@media (min-width: 768px) {+ .description {+ font-size: 24px;+ max-width: 415px;+ }+}++.ticket-text {+ margin-bottom: 30px;+}++.ticket-layout {+ display: grid;+ grid-template-columns: 1fr;+ gap: 45px;+ margin: auto;+ padding: var(--space-4x);+ padding-top: 64px;+ padding-bottom: 64px;+}++@media (min-width: 1200px) {+ .ticket-layout {+ padding-top: 0;+ padding-bottom: 0;+ }+}++.ticket-share-layout {+ align-items: center;+ margin-bottom: auto;+}++.ticket-visual:before {+ left: 50%;+ top: -7.5%;+ transform: translateZ(0) translateX(-50%) rotate(90deg);+}++.ticket-visual:after {+ left: 50%;+ bottom: -7.5%;+ transform: translateZ(0) translateX(-50%) rotate(90deg);+}++@media (min-width: 768px) {+ .ticket-visual:before {+ top: 50%;+ left: -7%;+ transform: translateZ(0) translateY(-50%);+ }++ .ticket-visual:after {+ top: 50%;+ left: 96%;+ transform: translateZ(0) translateY(-50%);+ }+}++.ticket-actions {+ margin-top: 70px;+ display: flex;+ align-items: center;+ justify-content: center;+ flex-direction: column;+}++.ticket-copy {+ margin-top: 30px;+}++.ticket-actions-placeholder {+ height: 280px;+}++@media (min-width: 768px) {+ .ticket-actions {+ flex-direction: row;+ }+ .ticket-actions-placeholder {+ height: 157px;+ }+}++@media (min-width: 1200px) {+ .ticket-layout {+ grid-template-columns: 1fr 1fr;+ }+ .hero {+ text-align: left;+ }+ .description {+ text-align: left;+ margin: 30px 0;+ }+}++.gold-text {+ color: #f4cf72;+ text-shadow: 0 0 1px rgba(0, 0, 0, 0.5), 0 0 4px rgba(0, 0, 0, 0.1);+}++@media (min-width: 768px) {+ .gold-text {+ color: #e4b641;+ }+}++.ticket-number {+ text-shadow: 0 0px 2px rgba(22, 22, 22, 0.9), 0 0px 6px rgba(131, 6, 184, 0.9),+ 0 0px 12px rgba(217, 195, 226, 0.5);+}+.ticket-number-gold {+ text-shadow: 0 0px 2px rgba(22, 22, 22, 0.9), 0 0px 6px rgba(255, 195, 125, 0.9),+ 0 0px 12px rgba(226, 224, 195, 0.5);+}diff --git a/apps/www/components/LaunchWeek/8/TicketBrickWall.tsx b/apps/www/components/LaunchWeek/8/TicketBrickWall.tsxnew file mode 100644index 00000000000..11f32de267c--- /dev/null+++ b/apps/www/components/LaunchWeek/8/TicketBrickWall.tsx@@ -0,0 +1,53 @@+import Link from 'next/link'+import React, { useEffect, useRef, useState } from 'react'+import { Button } from 'ui'+import { useBreakpoint } from 'common/hooks/useBreakpoint'+import { UserData } from '~/components/LaunchWeek/hooks/use-conf-data'+import { TicketBrickWallSlider } from './TicketBrickWallSlider'++type user = UserData++interface Props {+ users: user[]+}++export default function TicketBrickWall({ users }: Props) {+ const isMobile = useBreakpoint(768)++ return (+ <div className="relative pb-16 pt-16 md:pt-28">+ <div className="mx-auto">+ <div className="max-w-[38rem] mb-8 mx-auto">+ <h2 className="text-center radial-gradient-text-scale-500">Tickets from the community</h2>+ </div>+ <div+ className="grid py-4 relative+ before:content-[' '] before:absolute before:inset-0 before:right-auto before:w-1/4 before:bg-gradient-to-r before:from-[#020405] before:to-[#02040500] before:z-10 before:pointer-events-none+ after:content-[' '] after:absolute after:inset-0 after:left-auto after:w-1/4 after:bg-gradient-to-l after:from-[#020405] after:to-[#02040500] after:z-10 after:pointer-events-none+ "+ >+ <TicketBrickWallSlider users={users.slice(0, isMobile ? 5 : 7)} />+ <TicketBrickWallSlider+ users={users.slice(isMobile ? 5 : 7, isMobile ? 11 : 14)}+ reverse+ />+ {isMobile && <TicketBrickWallSlider users={users.slice(11, 17)} speed={6000} />}+ </div>+ <div className="flex justify-center w-full mx-auto mt-2 lg:mt-4">+ <Link href="/launch-week/tickets">+ <a>+ <Button+ type="outline"+ size="medium"+ onClick={() => window.scrollTo(0, 0)}+ className="text-white"+ >+ View all tickets+ </Button>+ </a>+ </Link>+ </div>+ </div>+ </div>+ )+}diff --git a/apps/www/components/LaunchWeek/8/TicketBrickWallSlider.tsx b/apps/www/components/LaunchWeek/8/TicketBrickWallSlider.tsxnew file mode 100644index 00000000000..c1484e5f961--- /dev/null+++ b/apps/www/components/LaunchWeek/8/TicketBrickWallSlider.tsx@@ -0,0 +1,78 @@+import Image from 'next/image'+import Link from 'next/link'+import { UserData } from '~/components/LaunchWeek/hooks/use-conf-data'++import { Swiper, SwiperSlide } from 'swiper/react'++import 'swiper/swiper.min.css'++interface Props {+ users: UserData[]+ reverse?: boolean+ speed?: number+ animate?: boolean+}++export function TicketBrickWallSlider({ users, reverse, speed = 50000, animate }: Props) {+ const STORAGE_URL = 'https://obuldanrptloktxcffvn.supabase.co/storage/v1/object/public/images/lw8'+ const BUCKET_FOLDER_VERSION = 'v1'+ const getOgUrl = (username: string, isGold: boolean) =>+ `${STORAGE_URL}/tickets/${+ isGold ? 'golden' : 'regular'+ }/${BUCKET_FOLDER_VERSION}/${username}.png`++ return (+ <div className="relative h-auto w-full m-0 overflow-hidden mb-2.5">+ <div+ className={[+ 'flex swiper-transition-linear ticket-brick-swiper',+ reverse && '-translate-x-20 w-[calc(100vw+400px)]',+ ].join(' ')}+ >+ <Swiper+ centeredSlides={true}+ spaceBetween={10}+ slidesPerView={5}+ loop={true}+ watchOverflow+ threshold={2}+ updateOnWindowResize+ breakpoints={{+ 320: {+ slidesPerView: reverse ? 4.5 : 2.5,+ },+ 720: {+ slidesPerView: reverse ? 5.5 : 3.5,+ },+ 1440: {+ slidesPerView: reverse ? 6.5 : 5,+ },+ }}+ >+ {users.map((user, i) => (+ <SwiperSlide key={user.username}>+ <Link href={`/launch-week/tickets/${user.username}`} key={user.username}>+ <a className="relative !w-[230px] md:w-[450px] !h-[200px] rounded-md md:rounded-lg transition-transform">+ <div className="relative w-full pt-[50%] transform rounded-md md:rounded-lg overflow-hidden bg-gradient-to-b from-[#22282a] to-[#030A0C]">+ <div className="absolute inset-[1px] w-[calc(100%-2px)] h-[calc(100%-2px)] rounded-md md:rounded-lg overflow-hidden p-[1px]">+ <Image+ src={getOgUrl(user.username!, !!user.golden)}+ alt={user.username}+ layout="fill"+ objectFit="cover"+ objectPosition="center"+ placeholder="blur"+ blurDataURL="/images/blur.png"+ className="absolute inset-[1px] rounded-md md:rounded-lg"+ />+ </div>+ </div>+ </a>+ </Link>+ </SwiperSlide>+ ))}+ </Swiper>+ </div>+ </div>+ )+}diff --git a/apps/www/components/LaunchWeek/8/TicketsGrid.tsx b/apps/www/components/LaunchWeek/8/TicketsGrid.tsxnew file mode 100644index 00000000000..ba88e77d1ee--- /dev/null+++ b/apps/www/components/LaunchWeek/8/TicketsGrid.tsx@@ -0,0 +1,98 @@+import { motion } from 'framer-motion'+import Image from 'next/image'+import Link from 'next/link'+import { useBreakpoint } from 'common/hooks/useBreakpoint'+import { UserData } from '../hooks/use-conf-data'++interface Props {+ loadedUsers: UserData[]+ isLoading: boolean+ pageCount: number+ offset: number+}++export default function TicketsGrid({ loadedUsers, isLoading, pageCount, offset }: Props) {+ const STORAGE_URL = 'https://obuldanrptloktxcffvn.supabase.co/storage/v1/object/public/images/lw8'+ const BUCKET_FOLDER_VERSION = 'v1'+ const getTicketImageUrl = (username: string, isGold: boolean) =>+ `${STORAGE_URL}/tickets/${+ isGold ? 'golden' : 'regular'+ }/${BUCKET_FOLDER_VERSION}/${username}.png`+ const isMobile = useBreakpoint(1024)+ const isTablet = useBreakpoint(1280)+ const horizontalOffset = isMobile ? 8 : 20++ return (+ <div+ className={['grid grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3 py-12 relative'].join(' ')}+ >+ {loadedUsers?.map((user, i) => {+ const rowTickets = isMobile ? 2 : isTablet ? 3 : 4+ const divider = Math.floor(i / rowTickets)+ const isOddRow = divider % 2 === 0+ // Delay should be no more than pageCount for new loaded users+ const recalculatedDelay = i >= pageCount * 2 ? (i - pageCount * (offset - 1)) / 15 : i / 15+ const imgUrl = getTicketImageUrl(user.username!, !!user.golden)++ return (+ <Link+ href={`/launch-week/tickets/${user.username}`}+ key={`${user.username}-000${i}`}+ onClick={() => window.scrollTo(0, 0)}+ >+ <motion.a+ className="relative w-full p-[1px] rounded-lg sm:rounded-xl overflow-hidden hover:cursor-pointer bg-gradient-to-b from-[#58585860] to-[#ffffff10]"+ initial={{+ opacity: 0,+ y: 20,+ x: isOddRow ? horizontalOffset : -horizontalOffset,+ }}+ animate={{+ opacity: 1,+ y: 0,+ x: isOddRow ? horizontalOffset : -horizontalOffset,+ transition: {+ duration: 0.4,+ ease: [0.24, 0.25, 0.05, 1],+ delay: recalculatedDelay,+ },+ }}+ >+ <div className="relative inset-0 w-full pt-[50%] bg-[#2f2e2e] overflow-hidden rounded-lg sm:rounded-xl">+ <Image+ src={imgUrl}+ alt={user.username}+ layout="fill"+ objectFit="cover"+ objectPosition="center"+ placeholder="blur"+ blurDataURL="/images/blur.png"+ />+ </div>+ </motion.a>+ </Link>+ )+ })}+ {isLoading &&+ Array.from({ length: pageCount }, (_, i) => (+ <motion.div+ className="relative rounded-lg sm:rounded-xl overflow-hidden h-0 w-full pt-[50%]"+ initial={{ opacity: 0, y: 20 }}+ animate={{+ opacity: 1,+ y: 0,+ transition: {+ duration: 0.4,+ ease: [0.24, 0.25, 0.05, 1],+ delay: i / 15,+ },+ }}+ >+ <div className="absolute inset-0 rounded-lg sm:rounded-xl bg-gradient-to-b from-[#58585820] to-[#ffffff10] p-[1px] overflow-hidden">+ <div className="absolute inset-[1px] rounded-lg sm:rounded-xl bg-gradient-to-b from-[#1c1c1c] to-[#121212]" />+ </div>+ </motion.div>+ ))}+ </div>+ )+}diff --git a/apps/www/components/LaunchWeek/8/ticket-brick-wall-slider.module.css b/apps/www/components/LaunchWeek/8/ticket-brick-wall-slider.module.cssnew file mode 100644index 00000000000..164e683b3a2--- /dev/null+++ b/apps/www/components/LaunchWeek/8/ticket-brick-wall-slider.module.css@@ -0,0 +1,3 @@+.swiper-wrapper .swiper-slide {+ width: 300px !important;+}diff --git a/apps/www/components/LaunchWeek/Ticket/hooks/use-conf-data.ts b/apps/www/components/LaunchWeek/hooks/use-conf-data.tssimilarity index 86%rename from apps/www/components/LaunchWeek/Ticket/hooks/use-conf-data.tsrename to apps/www/components/LaunchWeek/hooks/use-conf-data.tsindex fc8d1df8fbb..e8ba6d233c8 100644--- a/apps/www/components/LaunchWeek/Ticket/hooks/use-conf-data.ts+++ b/apps/www/components/LaunchWeek/hooks/use-conf-data.ts@@ -5,18 +5,24 @@ export type PageState = 'registration' | 'ticket'export type UserData = {id?: string+ email?: stringticketNumber?: numberusername?: stringname?: stringgolden?: booleanreferrals?: numberbg_image_id?: number+ metadata?: {+ role?: string+ company?: string+ location?: string+ }sharedOnTwitter?: stringsharedOnLinkedIn?: string}type ConfDataContextType = {- supabase: SupabaseClient+ supabase: SupabaseClient | anysession: Session | nulluserData: UserDatasetUserData: React.Dispatch<React.SetStateAction<UserData>>diff --git a/apps/www/components/LaunchWeek/Ticket/hooks/use-email-query-param.ts b/apps/www/components/LaunchWeek/hooks/use-email-query-param.tssimilarity index 100%rename from apps/www/components/LaunchWeek/Ticket/hooks/use-email-query-param.tsrename to apps/www/components/LaunchWeek/hooks/use-email-query-param.tsdiff --git a/apps/www/components/LaunchWeek/Ticket/hooks/useWinningChances.ts b/apps/www/components/LaunchWeek/hooks/useWinningChances.tssimilarity index 88%rename from apps/www/components/LaunchWeek/Ticket/hooks/useWinningChances.tsrename to apps/www/components/LaunchWeek/hooks/useWinningChances.tsindex b843fd0f5fe..46783c103d3 100644--- a/apps/www/components/LaunchWeek/Ticket/hooks/useWinningChances.ts+++ b/apps/www/components/LaunchWeek/hooks/useWinningChances.ts@@ -1,5 +1,5 @@import { UserData } from './use-conf-data'-import useConfData from '~/components/LaunchWeek/Ticket//hooks/use-conf-data'+import useConfData from '~/components/LaunchWeek/hooks/use-conf-data'function calculateWinChances(userData: UserData): number {// Just signing up gives you 1diff --git a/apps/www/components/LaunchWeek/Ticket/utils.module.css b/apps/www/components/LaunchWeek/utils.module.csssimilarity index 100%rename from apps/www/components/LaunchWeek/Ticket/utils.module.cssrename to apps/www/components/LaunchWeek/utils.module.cssdiff --git a/apps/www/components/Nav/index.tsx b/apps/www/components/Nav/index.tsxindex ec9a2c5d075..1869751d9f2 100644--- a/apps/www/components/Nav/index.tsx+++ b/apps/www/components/Nav/index.tsx@@ -2,7 +2,7 @@ import React, { useState } from 'react'import Link from 'next/link'import { useRouter } from 'next/router'-import { Button, Badge, IconStar, IconChevronDown } from 'ui'+import { Button, Badge, IconStar, IconChevronDown, Announcement, LW8CountdownBanner } from 'ui'import FlyOut from '~/components/UI/FlyOut'import Transition from 'lib/Transition'@@ -23,14 +23,16 @@ import * as supabaseLogoWordmarkWhite from 'common/assets/images/supabase-logo-wconst Nav = () => {const { isDarkMode } = useTheme()- const { pathname } = useRouter()+ const router = useRouter()const [open, setOpen] = useState(false)const [openProduct, setOpenProduct] = useState(false)const [openDevelopers, setOpenDevelopers] = useState(false)const isLoggedIn = useIsLoggedIn()- const isLaunchWeekPage = pathname.includes('launch-week')- const showLaunchWeekNavMode = isLaunchWeekPage && !open && !openProduct && !openDevelopers+ const isHomePage = router.pathname === '/'+ const isLaunchWeekPage = router.pathname.includes('launch-week')+ const showLaunchWeekNavMode =+ (isLaunchWeekPage || isHomePage) && !open && !openProduct && !openDevelopersReact.useEffect(() => {if (open) {@@ -197,8 +199,9 @@ const Nav = () => {return (<>- {/* <Announcement>- </Announcement> */}+ <Announcement>+ <LW8CountdownBanner />+ </Announcement><div className="sticky top-0 z-40 transform" style={{ transform: 'translate3d(0,0,999px)' }}><divclassName={[@@ -211,6 +214,7 @@ const Nav = () => {className={[`border-scale-300 border-b backdrop-blur-sm transition-opacity`,showLaunchWeekNavMode && '!opacity-100 !border-[#e0d2f430]',+ isLaunchWeekPage && showLaunchWeekNavMode && '!border-b-0',].join(' ')}>{/* <div className="relative flex justify-between h-16 mx-auto lg:container lg:px-10 xl:px-0"> */}@@ -225,19 +229,21 @@ const Nav = () => {<Link href="/" as="/"><a className="block w-auto h-6"><Image- src={- isLaunchWeekPage- ? supabaseLogoWordmarkWhite- : isDarkMode- ? supabaseLogoWordmarkDark- : supabaseLogoWordmarkLight- }+ src={isDarkMode ? supabaseLogoWordmarkDark : supabaseLogoWordmarkLight}width={124}height={24}alt="Supabase Logo"/></a></Link>++ {isLaunchWeekPage && (+ <Link href="/launch-week" as="/launch-week">+ <a className="hidden ml-2 xl:block font-mono text-sm uppercase leading-4">+ Launch Week+ </a>+ </Link>+ )}</div><div className="hidden pl-4 sm:ml-6 sm:space-x-4 lg:flex"><FlyOutNavButtondiff --git a/apps/www/data/Announcements.json b/apps/www/data/Announcements.jsonindex 7744b9fb5a8..6b0beeeee3d 100644--- a/apps/www/data/Announcements.json+++ b/apps/www/data/Announcements.json@@ -16,15 +16,15 @@},{"type": "Announcement",- "title": "Supabase Launch Week 7",+ "title": "Supabase Launch Week 8","description": "One new feature (or more) every day during a week.",- "imgUrl": "/images/launchweek/seven/launch-week-7.jpg",- "logoUrl": "/images/launchweek/seven/launch-week-7.jpg",+ "imgUrl": "/images/launchweek/8/lw8-og.jpg",+ "logoUrl": "/images/launchweek/8/lw8-og.jpg","organization": "Supabase","url": "/launch-week","postMeta": {"name": "Paul Copplestone",- "publishDate": "Apr 03, 2023",+ "publishDate": "Aug 07, 2023","readLength": 5},"ctaText": "Learn more"diff --git a/apps/www/lib/constants.ts b/apps/www/lib/constants.tsindex b1143f5d6f7..45408582f02 100644--- a/apps/www/lib/constants.ts+++ b/apps/www/lib/constants.ts@@ -35,9 +35,11 @@ export const SITE_URL =: 'http://localhost:3000/launch-week'export const SITE_ORIGIN = new URL(SITE_URL).originexport const TWITTER_USER_NAME = 'supabase'-export const COOKIE = 'supa-launch-week-ticke-user-id'-export const DATE = 'April 10th 2023'+export const COOKIE = 'supa-lw8-ticket-user-id'+export const LW7_DATE = 'April 10th 2023'+export const LW8_DATE = 'August 7-11'+export const LW8_LAUNCH_DATE = '2023-08-07T09:00:00.000-07:00'export const TWEET_TEXT =- "It's almost #SupaLaunchWeek 7! Generate your unique ticket here 👇 you can win a mechanical keyboard 🤩"-export const TWEET_TEXT_GOLDEN = `I turned my #SupaLaunchWeek 7 ticket Gold! 🤩\n\n`+ '#SupaLaunchWeek 8 is coming August 7-11! Join the party and generate your custom ticket for a chance to win swag ✨'+export const TWEET_TEXT_GOLDEN = `I turned my #SupaLaunchWeek 8 ticket GOLD! 🌟😎🌟\n\n`export const SITE_NAME = 'Supabase'diff --git a/apps/www/package.json b/apps/www/package.jsonindex aed48e75a3e..089c687effe 100644--- a/apps/www/package.json+++ b/apps/www/package.json@@ -19,12 +19,15 @@"@mdx-js/react": "^2.1.5","@next/bundle-analyzer": "^13.4.0","@next/mdx": "^12.3.2",+ "@react-three/drei": "^8.20.2",+ "@react-three/fiber": "^7.0.29","@supabase/auth-ui-react": "^0.1.6","@supabase/supabase-js": "^2.23.0","classnames": "^2.3.1","cobe": "^0.6.2","common": "*","config": "*",+ "dat.gui": "^0.7.9","date-fns": "2.10.0","dayjs": "^1.11.7","framer-motion": "^6.5.1",@@ -42,6 +45,7 @@"parse-numeric-range": "^1.3.0","react": "^17.0.2","react-copy-to-clipboard": "^5.1.0",+ "react-countdown": "^2.3.5","react-dom": "^17.0.2","react-ga": "^3.3.0","react-markdown": "^8.0.3",@@ -57,6 +61,7 @@"shared-data": "*","swiper": "^6.5.0","swr": "^0.5.4",+ "three": "^0.154.0","typescript": "^5.0.4","ui": "*","use-debounce": "^7.0.1",@@ -67,6 +72,7 @@"devDependencies": {"@tailwindcss/typography": "^0.5.9","@types/classnames": "^2.3.1",+ "@types/dat.gui": "^0.7.10","@types/jest": "^27.4.0","@types/mdx-js__react": "^1.5.5","@types/node": "^17.0.24",@@ -76,6 +82,7 @@"@types/react-copy-to-clipboard": "^5.0.4","@types/react-dom": "^17.0.11","@types/react-syntax-highlighter": "^15.5.6",+ "@types/three": "^0.154.0","autoprefixer": "^10.4.14","config": "*","file-loader": "^6.2.0",diff --git a/apps/www/pages/index.tsx b/apps/www/pages/index.tsxindex 37a1365aa72..6b5d1b04f81 100644--- a/apps/www/pages/index.tsx+++ b/apps/www/pages/index.tsx@@ -1,8 +1,10 @@import dynamic from 'next/dynamic'+import { useEffect } from 'react'import { getSortedPosts } from '~/lib/posts'import PostTypes from '~/types/post'import Layout from '~/components/Layouts/Default'import Hero from '~/components/Hero/Hero'+import { useTheme } from 'common'// Import Swiper styles if swiper used on pageimport 'swiper/swiper.min.css'@@ -19,6 +21,17 @@ const TwitterSocialSection = dynamic(() => import('~/components/TwitterSocialSectype Props = { customerStories: PostTypes[] }const Index = ({ customerStories }: Props) => {+ const { isDarkMode, toggleTheme } = useTheme()++ useEffect(() => {+ toggleTheme(true)+ document.body.className = 'dark'+ return () => {+ document.body.className = ''+ isDarkMode ? toggleTheme(true) : toggleTheme(false)+ }+ }, [])+return (<Layout><Hero />diff --git a/apps/www/pages/launch-week/6/index.tsx b/apps/www/pages/launch-week/6/index.tsxindex 2c14b90cd98..7f8f8426cc1 100644--- a/apps/www/pages/launch-week/6/index.tsx+++ b/apps/www/pages/launch-week/6/index.tsx@@ -3,7 +3,7 @@import { NextSeo } from 'next-seo'import Image from 'next/image'-import _days from '~/components/LaunchWeek/lw6_days.json'+import _days from '~/components/LaunchWeek/6/lw6_days.json'import DefaultLayout from '~/components/Layouts/Default'import SectionContainer from '~/components/Layouts/SectionContainer'@@ -34,7 +34,7 @@ const constellation = []export default function launchweek() {- const { isDarkMode } = useTheme()+ const { isDarkMode, toggleTheme } = useTheme()const title = 'Launch Week 6'const description = 'Supabase Launch Week 6 | 12-18 Dec 2022'const liveDay = null@@ -64,8 +64,13 @@ export default function launchweek() {}, [supabase])useEffect(() => {- document.body.className = isDarkMode ? 'dark bg-[#121212]' : 'light bg-[#fff]'- }, [isDarkMode])+ toggleTheme(true)+ document.body.className = 'bg-[#121212]'+ return () => {+ document.body.className = ''+ isDarkMode ? toggleTheme(true) : toggleTheme(false)+ }+ }, [])async function getCreators() {try {@@ -94,20 +99,20 @@ export default function launchweek() {<div className="flex flex-1 flex-col sm:flex-row"><div className="flex gap-4 min-w-[380px] items-center"><Badge- className={`!bg-transparent !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-[#99bbab] to-[#396f55] !border-[#4d898c] dark:from-white dark:to-[#DFFFF1] dark:!border-[#DFFFF1] h-fit relative ${+ className={`!bg-transparent !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-white to-[#DFFFF1] !border-[#DFFFF1] h-fit relative ${shipped- ? 'after:absolute after:rounded-full text-black after:bg-white after:w-full after:h-full after:top-0 after:right-0 after:bottom-0 after:left-0 after:bg-gradient-to-br after:from-[#dceef0] after:to-[#FFFFFF] dark:text-transparent dark:!border-[#163837] after:dark:from-[#14292c] after:dark:to-[#141516] after:border-[#c8d8d9] after:dark:border-[#1f3536] after:-z-10 border-[#DFFFF1]'+ ? 'after:absolute after:rounded-full after:bg-white after:w-full after:h-full after:top-0 after:right-0 after:bottom-0 after:left-0 after:bg-gradient-to-br text-transparent !border-[#163837] after:from-[#14292c] after:to-[#141516] after:border-[#1f3536] after:-z-10 ': ''}`}>{shipped ? 'Shipped' : 'Coming Soon'}</Badge>- <span className="text-scale-900 text-sm">+ <span className="text-[#707070] text-sm">{day} ・ {date}</span></div>- <span className="text-scale-1200 mt-3 sm:mt-0">{title}</span>+ <span className="text-[#ededed] mt-3 sm:mt-0">{title}</span></div>)}@@ -116,18 +121,18 @@ export default function launchweek() {return (<div className="flex gap-2 z-10"><a href={blog} target="_blank" rel="noopener">- <div className="flex items-center border border-slate-400 bg-gradient-to-r from-[#fcfcfc] to-[#f2f2f2] hover:to-[#d5d5d5] text-black dark:text-white dark:from-[#191919] dark:to-[#464444] dark:hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2">+ <div className="flex items-center border border-[#2E2E2E] bg-gradient-to-r text-white from-[#191919] to-[#464444] hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2">Blog post- <div className="bg-[#eeeeee] dark:bg-[#313131] rounded-full inline-block p-1 ml-2">+ <div className="bg-[#313131] rounded-full inline-block p-1 ml-2"><img src="/images/launchweek/icons-blogpost.svg" className="w-4 h-4"></img></div></div></a>{docs && (<a href={docs} target="_blank" rel="noopener">- <div className="flex items-center border border-slate-400 bg-gradient-to-r from-[#fcfcfc] to-[#f2f2f2] hover:to-[#d5d5d5] text-black dark:text-white dark:from-[#191919] dark:to-[#464444] dark:hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2">+ <div className="flex items-center border border-[#2E2E2E] bg-gradient-to-r text-white from-[#191919] to-[#464444] hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2">Docs- <div className="bg-[#eeeeee] dark:bg-[#313131] rounded-full inline-block p-1 ml-2">+ <div className="bg-[#313131] rounded-full inline-block p-1 ml-2"><img src="/images/launchweek/icons-docs.svg" className="w-4 h-4"></img></div></div>@@ -135,9 +140,9 @@ export default function launchweek() {)}{video && (<a href={video} target="_blank" rel="noopener">- <div className="flex items-center border border-slate-400 bg-gradient-to-r from-[#fcfcfc] to-[#f2f2f2] hover:to-[#d5d5d5] text-black dark:text-white dark:from-[#191919] dark:to-[#464444] dark:hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2">+ <div className="flex items-center border border-[#2E2E2E] bg-gradient-to-r text-white from-[#191919] to-[#464444] hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2">Video- <div className="bg-[#eeeeee] dark:bg-[#313131] rounded-full inline-block p-1 ml-2">+ <div className="bg-[#313131] rounded-full inline-block p-1 ml-2"><img src="/images/launchweek/video-icon.svg" className="w-4 h-4"></img></div></div>@@ -173,13 +178,13 @@ export default function launchweek() {)}><div className="flex justify-center">- <img+ {/* <imgsrc="/images/launchweek/launchweek-logo--light.svg"className="flex w-40 dark:hidden lg:w-80"- />+ /> */}<imgsrc="/images/launchweek/launchweek-logo--dark.svg"- className="hidden w-40 dark:flex lg:w-80"+ className="w-40 flex lg:w-80"/></div><p className="text-scale-1100 text-sm text-center">Dec 12 – 16 at 6 AM PT | 9 AM ET</p>@@ -214,7 +219,7 @@ export default function launchweek() {</div><SectionContainer className="!py-0 ">- <div className="border rounded-2xl border-slate-400 text-sm px-5 py-4 flex flex-col sm:flex-row justify-between items-center">+ <div className="border border-[#2E2E2E] rounded-2xl text-sm px-5 py-4 flex flex-col sm:flex-row justify-between items-center"><div className="relative flex items-center mb-4 sm:mb-0"><div className="flex min-w-[150px]"><img@@ -225,23 +230,23 @@ export default function launchweek() {></img></div><div className="flex flex-col lg:flex-row ml-8 sm:ml-10">- <span className="text-black dark:text-white mr-2">Who we hire at Supabase</span>+ <span className="text-white mr-2">Who we hire at Supabase</span><span className="text-slate-900">Fireside chat with founders</span></div></div><div className="flex gap-2 z-10"><a href={'https://youtu.be/-BG9XptyCKI'} target="_blank" rel="noopener">- <div className="flex items-center border border-slate-400 bg-gradient-to-r from-[#fcfcfc] to-[#f2f2f2] hover:to-[#d5d5d5] text-black dark:text-white dark:from-[#191919] dark:to-[#464444] dark:hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2 min-w-[130px]">+ <div className="flex items-center border border-[#2E2E2E] bg-gradient-to-r text-white from-[#191919] to-[#464444] hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2 min-w-[130px]">Watch video- <div className="bg-[#eeeeee] dark:bg-[#313131] rounded-full inline-block p-1 ml-2">+ <div className="bg-[#313131] rounded-full inline-block p-1 ml-2"><img src="/images/launchweek/video-icon.svg" className="w-3 h-3"></img></div></div></a><a href={'/blog/who-we-hire'} target="_blank" rel="noopener">- <div className="flex items-center border border-slate-400 bg-gradient-to-r from-[#fcfcfc] to-[#f2f2f2] hover:to-[#d5d5d5] text-black dark:text-white dark:from-[#191919] dark:to-[#464444] dark:hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2 min-w-[142px]">+ <div className="flex items-center border border-[#2E2E2E] bg-gradient-to-r text-white from-[#191919] to-[#464444] hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2 min-w-[142px]">Read blogpost- <div className="bg-[#eeeeee] dark:bg-[#313131] rounded-full inline-block p-1 ml-2">+ <div className="bg-[#313131] rounded-full inline-block p-1 ml-2"><img src="/images/launchweek/icons-blogpost.svg" className="w-3 h-3"></img></div></div>@@ -250,25 +255,26 @@ export default function launchweek() {</div></SectionContainer><SectionContainer className="!pt-4 ">- <div className="border rounded-2xl border-slate-400 text-sm px-5 py-4 flex flex-col sm:flex-row justify-between items-center">+ <div className="border border-[#2E2E2E] rounded-2xl text-sm px-5 py-4 flex flex-col sm:flex-row justify-between items-center"><div className="relative flex items-center mb-4 sm:mb-0"><div className="flex min-w-[150px]"><img- src={`/images/launchweek/${isDarkMode ? 'outro.svg' : 'outro-light.svg'}`}+ // src={`/images/launchweek/${isDarkMode ? 'outro.svg' : 'outro-light.svg'}`}+ src={`/images/launchweek/outro.svg`}width={110}height={80}></img></div><div className="flex flex-col lg:flex-row ml-8 sm:ml-10">- <span className="text-black dark:text-white mr-2">Wrap Up</span>+ <span className="text-white mr-2">Wrap Up</span><span className="text-slate-900">Everything we shipped</span></div></div><div className="flex gap-2 z-10"><a href={'/blog/launch-week-6-wrap-up'} target="_blank" rel="noopener">- <div className="flex items-center border border-slate-400 bg-gradient-to-r from-[#fcfcfc] to-[#f2f2f2] hover:to-[#d5d5d5] text-black dark:text-white dark:from-[#191919] dark:to-[#464444] dark:hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2 min-w-[142px]">+ <div className="flex items-center border border-[#2E2E2E] bg-gradient-to-r text-white from-[#191919] to-[#464444] hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2 min-w-[142px]">Read blogpost- <div className="bg-[#eeeeee] dark:bg-[#313131] rounded-full inline-block p-1 ml-2">+ <div className="bg-[#313131] rounded-full inline-block p-1 ml-2"><img src="/images/launchweek/icons-blogpost.svg" className="w-3 h-3"></img></div></div>@@ -281,7 +287,7 @@ export default function launchweek() {type="default"openBehaviour="multiple"size="large"- className="text-scale-900 dark:text-white"+ className="text-white"justified={false}bordered={false}chevronAlign="right"@@ -293,7 +299,7 @@ export default function launchweek() {day5.d?.toString(),]}>- <div className="border-b pb-3">+ <div className="border-b border-[#2E2E2E] pb-3"><Accordion.Itemheader={<AccordionHeader@@ -318,11 +324,11 @@ export default function launchweek() {}}></div><div- className={`flex flex-col flex-1 items-center gap-5 lg:items-start lg:justify-between border rounded-xl h-full relative overflow-hidden after:opacity- after:absolute after:bg-no-repeat after:bg-[center_bottom] lg:after:bg-[right_15%_top_100px] xl:after:bg-[right_15%_top_60px] after:bg-[length:300px_180px] after:lg:bg-[length:450px_300px] after:xl:bg-[length:528px_367px] after:dark:bg-[url('/images/launchweek/docs-update-bg.png')] after:bg-[url('/images/launchweek/docs-update-bg-light.png')] after:top-0 after:right-0 after:bottom-0 after:left-0 p-14 text-2xl before:absolute before:w-full before:h-full before:top-52 before:right-0 before:bottom-0 before:left-0 before:border-[#1f3536] before:-z-10 !px-3 sm:!px-14`}+ className={`flex flex-col flex-1 items-center gap-5 lg:items-start lg:justify-between border border-[#2E2E2E] rounded-xl h-full relative overflow-hidden after:absolute after:bg-no-repeat after:bg-[center_bottom] lg:after:bg-[right_15%_top_100px] xl:after:bg-[right_15%_top_60px] after:bg-[length:300px_180px] after:lg:bg-[length:450px_300px] after:xl:bg-[length:528px_367px] after:bg-[url('/images/launchweek/docs-update-bg.png')] after:top-0 after:right-0 after:bottom-0 after:left-0 p-14 text-2xl before:absolute before:w-full before:h-full before:top-52 before:right-0 before:bottom-0 before:left-0 before:border-[#1f3536] before:-z-10 !px-3 sm:!px-14`}>- <div className="flex items-center relative z-10 justify-between flex-col-reverse lg:flex-row lg:justify-start gap-2 text-black dark:text-white">+ <div className="flex items-center relative z-10 justify-between flex-col-reverse lg:flex-row lg:justify-start gap-2 text-white"><span>{day1.description}</span>- <Badge className="!bg-transparent h-fit lg:ml-4 text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-[#99bbab] to-[#396f55] border-[#4d898c] dark:from-white dark:to-[#DFFFF1] dark:border-[#DFFFF1]">+ <Badge className="!bg-transparent h-fit lg:ml-4 text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-white to-[#DFFFF1] border-[#DFFFF1]">Redesigned</Badge></div>@@ -336,7 +342,7 @@ export default function launchweek() {)}</Accordion.Item></div>- <div className="border-b pb-3">+ <div className="border-b border-[#2E2E2E] pb-3"><Accordion.Itemheader={<AccordionHeader@@ -353,7 +359,7 @@ export default function launchweek() {{day2.steps.length > 0 && (<div className="h-[800px] lg:h-[400px] flex flex-col gap-5 lg:flex-row"><div- className={`relative overflow-hidden group/2 flex-1 flex flex-col items-center gap-5 lg:items-start justify-between basis-1/2 lg:basis-2/3 border rounded-xl h-full p-14 xs:text-2xl text-xl text-center bg-no-repeat bg-[url('/images/launchweek/image-processing-bg-light-alt.png')] xs:bg-[url('/images/launchweek/image-processing-bg-light.png')] dark:bg-[url('/images/launchweek/image-processing-bg-alt.png')] xs:dark:bg-[url('/images/launchweek/image-processing-bg.png')] bg-[right_30px_top_35px] lg:bg-[top_25px_right_25px] bg-contain`}+ className={`relative overflow-hidden group/2 flex-1 flex flex-col items-center gap-5 lg:items-start justify-between basis-1/2 lg:basis-2/3 border border-[#2E2E2E] rounded-xl h-full p-14 xs:text-2xl text-xl text-center bg-no-repeat bg-[url('/images/launchweek/image-processing-bg-alt.png')] xs:bg-[url('/images/launchweek/image-processing-bg.png')] bg-[right_30px_top_35px] lg:bg-[top_25px_right_25px] bg-contain`}><divclassName="top-0 absolute group-hover/2:scale-105 opacity-60 group-hover/2:opacity-100 w-full h-full -z-10 transition-all duration-500"@@ -363,16 +369,16 @@ export default function launchweek() {}, transparent)`,}}></div>- <div className="flex items-center justify-between flex-col-reverse lg:flex-row lg:justify-start gap-2 text-black dark:text-white">+ <div className="flex items-center justify-between flex-col-reverse lg:flex-row lg:justify-start gap-2 text-white"><div>{day2.steps[0].title}</div>- <Badge className="!bg-transparent h-fit lg:ml-4 text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-[#99bbab] to-[#396f55] border-[#598973] dark:from-white dark:to-[#1a7a4ca1] dark:border-[#DFFFF1]">+ <Badge className="!bg-transparent h-fit lg:ml-4 text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-white to-[#1a7a4ca1] border-[#DFFFF1]">New</Badge></div><SectionButtons docs={day2.steps[0].docs} blog={day2.steps[0].blog} /></div><div- className={`relative overflow-hidden group/3 flex-1 flex flex-col items-center justify-between basis-1/2 lg:basis-1/3 border rounded-xl h-full bg-no-repeat p-14 text-2xl bg-[url('/images/launchweek/cdn-caching-bg-light.png')] dark:bg-[url('/images/launchweek/cdn-caching-bg.png')] bg-[top_170px_center] lg:bg-[center_bottom] bg-contain`}+ className={`relative overflow-hidden group/3 flex-1 flex flex-col items-center justify-between basis-1/2 lg:basis-1/3 border border-[#2E2E2E] rounded-xl h-full bg-no-repeat p-14 text-2xl bg-[url('/images/launchweek/cdn-caching-bg.png')] bg-[top_170px_center] lg:bg-[center_bottom] bg-contain`}><divclassName="top-0 absolute group-hover/3:scale-105 opacity-60 group-hover/3:opacity-100 w-full h-full -z-10 transition-all duration-500"@@ -383,10 +389,10 @@ export default function launchweek() {}}></div><div className="flex flex-col items-center gap-2 min-w-[300px]">- <Badge className="!bg-transparent h-fit text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-[#99bbab] to-[#396f55] border-[#598973] dark:from-white dark:to-[#1a7a4ca1] dark:border-[#DFFFF1]">+ <Badge className="!bg-transparent h-fit text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-white to-[#1a7a4ca1] border-[#DFFFF1]">New</Badge>- <span className="text-black dark:text-white">{day2.steps[1].title}</span>+ <span className="text-white">{day2.steps[1].title}</span><p className="text-sm text-slate-900">{day2.steps[1].description}</p></div><SectionButtons docs={day2.steps[1].docs} blog={day2.steps[1].blog} />@@ -395,7 +401,7 @@ export default function launchweek() {)}</Accordion.Item></div>- <div className="border-b pb-3">+ <div className="border-b border-[#2E2E2E] pb-3"><Accordion.Itemheader={<AccordionHeader@@ -412,7 +418,7 @@ export default function launchweek() {{day3.steps.length > 0 && (<div className="h-[400px] flex gap-5 group"><div- className={`flex flex-col text-center items-center lg:items-start justify-between flex-1 border rounded-xl h-full bg-no-repeat p-14 text-2xl relative`}+ className={`flex flex-col text-center items-center lg:items-start justify-between flex-1 border border-[#2E2E2E] rounded-xl h-full bg-no-repeat p-14 text-2xl relative`}><div className="absolute top-0 right-0 w-full h-full -z-20 "><Image@@ -430,9 +436,9 @@ export default function launchweek() {<div className="absolute top-0 right-0 w-full h-full -z-10 opacity-0 group-hover:opacity-100 duration-500 transition-all"><Imagesrc={- isDarkMode- ? '/images/launchweek/mfa-dark-hover.png'- : '/images/launchweek/mfa-light-hover.png'+ // isDarkMode+ '/images/launchweek/mfa-dark-hover.png'+ // : '/images/launchweek/mfa-light-hover.png'}layout="fill"objectFit="cover"@@ -440,9 +446,9 @@ export default function launchweek() {/></div>- <div className="flex items-center justify-between flex-col-reverse lg:flex-row lg:justify-start text-black dark:text-white">+ <div className="flex items-center justify-between flex-col-reverse lg:flex-row lg:justify-start text-white"><span>{day3.steps[0].title}</span>- <Badge className="!bg-transparent h-fit lg:ml-4 text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-[#99bbab] to-[#396f55] border-[#598973] dark:from-white dark:to-[#1a7a4ca1] dark:border-[#DFFFF1]">+ <Badge className="!bg-transparent h-fit lg:ml-4 text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-white to-[#1a7a4ca1] border-[#DFFFF1]">Updated</Badge></div>@@ -452,7 +458,7 @@ export default function launchweek() {)}</Accordion.Item></div>- <div className="border-b pb-3">+ <div className="border-b border-[#2E2E2E] pb-3"><Accordion.Itemheader={<AccordionHeader@@ -469,7 +475,7 @@ export default function launchweek() {{day4.steps.length > 0 && (<div className="h-[400px] flex flex-col gap-5 lg:flex-row group/day4 relative overflow-hidden"><div- className={`relative flex flex-col items-center justify-between lg:items-start flex-1 basis-1/2 lg:basis-2/3 border rounded-xl h-full p-14 text-2xl bg-no-repeat bg-cover !px-3 sm:!px-14`}+ className={`relative flex flex-col items-center justify-between lg:items-start flex-1 basis-1/2 lg:basis-2/3 border border-[#2E2E2E] rounded-xl h-full p-14 text-2xl bg-no-repeat bg-cover !px-3 sm:!px-14`}><divclassName={`absolute top-0 right-0 w-full h-full -z-20 ${styles.wrappers}`}@@ -502,9 +508,9 @@ export default function launchweek() {className="test"/></div>- <div className="flex items-center flex-col-reverse lg:flex-row text-black dark:text-white">+ <div className="flex items-center flex-col-reverse lg:flex-row text-white"><span>{day4.steps[0].title}</span>- <Badge className="!bg-transparent h-fit lg:ml-4 text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-[#99bbab] to-[#396f55] border-[#4d898c] dark:from-white dark:to-[#1a7a4ca1] dark:border-[#DFFFF1]">+ <Badge className="!bg-transparent h-fit lg:ml-4 text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-white to-[#1a7a4ca1] border-[#DFFFF1]">New</Badge></div>@@ -518,7 +524,7 @@ export default function launchweek() {)}</Accordion.Item></div>- <div className="border-b pb-3" id="currentDay">+ <div className="border-b border-[#2E2E2E] pb-3" id="currentDay"><Accordion.Itemheader={<AccordionHeader@@ -536,7 +542,7 @@ export default function launchweek() {<><div className="h-[800px] lg:h-[400px] flex flex-col gap-5 lg:flex-row"><div- className={`relative group/day5step1 flex flex-col items-center justify-between lg:items-start flex-1 basis-1/2 lg:basis-2/3 border rounded-xl h-full bg-no-repeat p-14 text-2xl overflow-hidden`}+ className={`relative group/day5step1 flex flex-col items-center justify-between lg:items-start flex-1 basis-1/2 lg:basis-2/3 border border-[#2E2E2E] rounded-xl h-full bg-no-repeat p-14 text-2xl overflow-hidden`}><divclassName={`absolute top-0 right-0 w-full h-full -z-20 ${styles.wrappers}`}@@ -570,15 +576,15 @@ export default function launchweek() {/></div><div className="flex items-center flex-col-reverse lg:flex-row">- <span className="text-black dark:text-white">{day5.steps[0].title}</span>- <Badge className="!bg-transparent h-fit lg:ml-4 text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-[#99bbab] to-[#396f55] border-[#4d898c] dark:from-white dark:to-[#1a7a4ca1] dark:border-[#DFFFF1]">+ <span className="text-white">{day5.steps[0].title}</span>+ <Badge className="!bg-transparent h-fit lg:ml-4 text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-white to-[#1a7a4ca1] border-[#DFFFF1]">New</Badge></div><SectionButtons docs={day5.steps[0].docs} blog={day5.steps[0].blog} /></div><div- className={`relative group/day5step2 flex-1 flex flex-col items-center justify-between basis-1/2 lg:basis-1/3 border rounded-xl h-full bg-no-repeat p-14 text-2xl overflow-hidden`}+ className={`relative group/day5step2 flex-1 flex flex-col items-center justify-between basis-1/2 lg:basis-1/3 border border-[#2E2E2E] rounded-xl h-full bg-no-repeat p-14 text-2xl overflow-hidden`}><div className={`absolute top-0 right-0 w-full h-full -z-20`}><Image@@ -610,20 +616,18 @@ export default function launchweek() {/></div><div className="flex flex-col items-center gap-2 min-w-[300px]">- <Badge className="!bg-transparent h-fit ml-4 text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-[#99bbab] to-[#396f55] border-[#4d898c] dark:from-white dark:to-[#1a7a4ca1] dark:border-[#DFFFF1]">+ <Badge className="!bg-transparent h-fit ml-4 text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-white to-[#1a7a4ca1] border-[#DFFFF1]">New</Badge>- <span className="text-black dark:text-white text-center">- {day5.steps[1].title}- </span>+ <span className="text-white text-center">{day5.steps[1].title}</span></div><SectionButtons docs={day5.steps[1].docs} blog={day5.steps[1].blog} /></div></div>- <h3 className="text-black dark:text-white text-lg mb-4 mt-4">Community</h3>+ <h3 className="text-white text-lg mb-4 mt-4">Community</h3><div className="h-[400px] flex flex-col gap-5 lg:flex-row group/community relative overflow-hidden"><div- className={`relative flex flex-col items-center justify-between lg:items-start flex-1 basis-1/2 lg:basis-2/3 border rounded-xl h-full p-14 text-2xl bg-no-repeat bg-cover !px-3 sm:!px-14`}+ className={`relative flex flex-col items-center justify-between lg:items-start flex-1 basis-1/2 lg:basis-2/3 border border-[#2E2E2E] rounded-xl h-full p-14 text-2xl bg-no-repeat bg-cover !px-3 sm:!px-14`}><divclassName={`absolute top-0 right-0 w-full h-full -z-20 ${styles.community_wrappers}`}@@ -657,7 +661,7 @@ export default function launchweek() {/></div><div className="flex items-center flex-col-reverse lg:flex-row">- <span className="text-black dark:text-white">Community Day</span>+ <span className="text-white">Community Day</span></div><div className="flex flex-col md:flex-row gap-4 md:gap-2 z-10 "><div className="flex gap-4 md:gap-2">@@ -666,9 +670,9 @@ export default function launchweek() {target="_blank"rel="noopener">- <div className="flex items-center border border-slate-400 bg-gradient-to-r from-[#fcfcfc] to-[#f2f2f2] hover:to-[#d5d5d5] text-black dark:text-white dark:from-[#191919] dark:to-[#464444] dark:hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2">+ <div className="flex items-center border border-[#2E2E2E] bg-gradient-to-r text-white from-[#191919] to-[#464444] hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2">Blog post- <div className="bg-[#eeeeee] dark:bg-[#313131] rounded-full inline-block p-1 ml-2">+ <div className="bg-[#313131] rounded-full inline-block p-1 ml-2"><imgsrc="/images/launchweek/icons-blogpost.svg"className="w-4 h-4"@@ -681,9 +685,9 @@ export default function launchweek() {target="_blank"rel="noopener">- <div className="flex items-center border border-slate-400 bg-gradient-to-r from-[#fcfcfc] to-[#f2f2f2] hover:to-[#d5d5d5] text-black dark:text-white dark:from-[#191919] dark:to-[#464444] dark:hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2">+ <div className="flex items-center border border-[#2E2E2E] bg-gradient-to-r text-white from-[#191919] to-[#464444] hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2">Flutterflow- <div className="bg-[#eeeeee] dark:bg-[#313131] rounded-full inline-block p-1 ml-2">+ <div className="bg-[#313131] rounded-full inline-block p-1 ml-2"><imgsrc="/images/launchweek/video-icon.svg"className="w-4 h-4"@@ -698,9 +702,9 @@ export default function launchweek() {target="_blank"rel="noopener">- <div className="flex items-center border border-slate-400 bg-gradient-to-r from-[#fcfcfc] to-[#f2f2f2] hover:to-[#d5d5d5] text-black dark:text-white dark:from-[#191919] dark:to-[#464444] dark:hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2">+ <div className="flex items-center border border-[#2E2E2E] bg-gradient-to-r text-white from-[#191919] to-[#464444] hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2">OneSignal- <div className="bg-[#eeeeee] dark:bg-[#313131] rounded-full inline-block p-1 ml-2">+ <div className="bg-[#313131] rounded-full inline-block p-1 ml-2"><imgsrc="/images/launchweek/video-icon.svg"className="w-4 h-4"@@ -713,9 +717,9 @@ export default function launchweek() {target="_blank"rel="noopener">- <div className="flex items-center border border-slate-400 bg-gradient-to-r from-[#fcfcfc] to-[#f2f2f2] hover:to-[#d5d5d5] text-black dark:text-white dark:from-[#191919] dark:to-[#464444] dark:hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2">+ <div className="flex items-center border border-[#2E2E2E] bg-gradient-to-r text-white from-[#191919] to-[#464444] hover:to-[#4e4e4e] rounded-full text-sm py-2 pl-3 pr-2">NextAuth- <div className="bg-[#eeeeee] dark:bg-[#313131] rounded-full inline-block p-1 ml-2">+ <div className="bg-[#313131] rounded-full inline-block p-1 ml-2"><imgsrc="/images/launchweek/video-icon.svg"className="w-4 h-4"@@ -727,10 +731,10 @@ export default function launchweek() {</div></div></div>- <h3 className="text-black dark:text-white text-lg mb-4 mt-4">One more thing</h3>+ <h3 className="text-white text-lg mb-4 mt-4">One more thing</h3><div className="flex flex-col lg:grid grid-cols-3 grid-rows-2 gap-4"><div- className={`min-h-[400px] relative group/day5step2 flex-1 flex flex-col items-center justify-between basis-1/2 lg:basis-1/3 border rounded-xl bg-no-repeat p-14 text-2xl overflow-hidden`}+ className={`min-h-[400px] relative group/day5step2 flex-1 flex flex-col items-center justify-between basis-1/2 lg:basis-1/3 border border-[#2E2E2E] rounded-xl bg-no-repeat p-14 text-2xl overflow-hidden`}><div className={`absolute top-0 right-0 w-full h-full -z-20`}><Image@@ -762,12 +766,10 @@ export default function launchweek() {/></div><div className="flex flex-col items-center gap-2 min-w-[300px]">- <Badge className="!bg-transparent h-fit text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-[#99bbab] to-[#396f55] border-[#4d898c] dark:from-white dark:to-[#1a7a4ca1] dark:border-[#DFFFF1]">+ <Badge className="!bg-transparent h-fit text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-white to-[#1a7a4ca1] border-[#DFFFF1]">Updated</Badge>- <span className="text-black dark:text-white text-center">- pg_graphql v1.0- </span>+ <span className="text-white text-center">pg_graphql v1.0</span></div><SectionButtonsdocs="/docs/guides/api#graphql-api"@@ -775,7 +777,7 @@ export default function launchweek() {/></div><div- className={`min-h-[400px] relative group/day5step2 flex-1 flex flex-col items-center justify-between basis-1/2 lg:basis-1/3 border rounded-xl bg-no-repeat p-14 text-2xl overflow-hidden`}+ className={`min-h-[400px] relative group/day5step2 flex-1 flex flex-col items-center justify-between basis-1/2 lg:basis-1/3 border border-[#2E2E2E] rounded-xl bg-no-repeat p-14 text-2xl overflow-hidden`}><div className={`absolute top-0 right-0 w-full h-full -z-20`}><Image@@ -807,12 +809,10 @@ export default function launchweek() {/></div><div className="flex flex-col items-center gap-2 min-w-[300px]">- <Badge className="!bg-transparent h-fit text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-[#99bbab] to-[#396f55] border-[#4d898c] dark:from-white dark:to-[#1a7a4ca1] dark:border-[#DFFFF1]">+ <Badge className="!bg-transparent h-fit text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-white to-[#1a7a4ca1] border-[#DFFFF1]">New</Badge>- <span className="text-black dark:text-white text-center">- Custom Domains- </span>+ <span className="text-white text-center">Custom Domains</span></div><SectionButtonsdocs="/docs/guides/platform/custom-domains"@@ -820,7 +820,7 @@ export default function launchweek() {/></div><div- className={`min-h-[400px] relative group/day5step2 flex-1 flex flex-col items-center justify-between basis-1/2 lg:basis-1/3 border rounded-xl bg-no-repeat p-14 text-2xl overflow-hidden`}+ className={`min-h-[400px] relative group/day5step2 flex-1 flex flex-col items-center justify-between basis-1/2 lg:basis-1/3 border border-[#2E2E2E] rounded-xl bg-no-repeat p-14 text-2xl overflow-hidden`}><div className={`absolute top-0 right-0 w-full h-full -z-20`}><Image@@ -852,12 +852,10 @@ export default function launchweek() {/></div><div className="flex flex-col items-center gap-2 min-w-[300px]">- <Badge className="!bg-transparent h-fit text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-[#99bbab] to-[#396f55] border-[#4d898c] dark:from-white dark:to-[#1a7a4ca1] dark:border-[#DFFFF1]">+ <Badge className="!bg-transparent h-fit text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-white to-[#1a7a4ca1] border-[#DFFFF1]">New</Badge>- <span className="text-black dark:text-white text-center">- Point-in-time recovery- </span>+ <span className="text-white text-center">Point-in-time recovery</span></div><SectionButtonsdocs="/docs/guides/platform/going-into-prod"@@ -865,7 +863,7 @@ export default function launchweek() {/></div><div- className={`min-h-[400px] relative group/day5step2 flex-1 flex flex-col items-center justify-between basis-1/2 lg:basis-1/3 border rounded-xl bg-no-repeat p-14 text-2xl overflow-hidden`}+ className={`min-h-[400px] relative group/day5step2 flex-1 flex flex-col items-center justify-between basis-1/2 lg:basis-1/3 border border-[#2E2E2E] rounded-xl bg-no-repeat p-14 text-2xl overflow-hidden`}><div className={`absolute top-0 right-0 w-full h-full -z-20`}><Image@@ -897,10 +895,10 @@ export default function launchweek() {/></div><div className="flex flex-col items-center gap-2 min-w-[300px]">- <Badge className="!bg-transparent h-fit text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-[#99bbab] to-[#396f55] border-[#4d898c] dark:from-white dark:to-[#1a7a4ca1] dark:border-[#DFFFF1]">+ <Badge className="!bg-transparent h-fit text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-white to-[#1a7a4ca1] border-[#DFFFF1]">Experimental</Badge>- <span className="text-black dark:text-white text-center">pg_crdt</span>+ <span className="text-white text-center">pg_crdt</span></div><SectionButtonsdocs="https://github.com/supabase/pg_crdt"@@ -908,7 +906,7 @@ export default function launchweek() {/></div><div- className={`min-h-[400px] relative group/day5step2 flex-1 flex flex-col items-center justify-between basis-1/2 lg:basis-1/3 border rounded-xl bg-no-repeat p-14 text-2xl overflow-hidden`}+ className={`min-h-[400px] relative group/day5step2 flex-1 flex flex-col items-center justify-between basis-1/2 lg:basis-1/3 border border-[#2E2E2E] rounded-xl bg-no-repeat p-14 text-2xl overflow-hidden`}><div className={`absolute top-0 right-0 w-full h-full -z-20`}><Image@@ -940,12 +938,10 @@ export default function launchweek() {/></div><div className="flex flex-col items-center gap-2 min-w-[300px]">- <Badge className="!bg-transparent h-fit text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-[#99bbab] to-[#396f55] border-[#4d898c] dark:from-white dark:to-[#1a7a4ca1] dark:border-[#DFFFF1]">+ <Badge className="!bg-transparent h-fit text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-white to-[#1a7a4ca1] border-[#DFFFF1]">Upgrade</Badge>- <span className="text-black dark:text-white text-center">- Postgres 15- </span>+ <span className="text-white text-center">Postgres 15</span></div><SectionButtonsdocs="https://www.postgresql.org/docs/15/release-15.html"@@ -953,7 +949,7 @@ export default function launchweek() {/></div><div- className={`min-h-[400px] relative group/day5step2 flex-1 flex flex-col items-center justify-between basis-1/2 lg:basis-1/3 border rounded-xl bg-no-repeat p-14 text-2xl overflow-hidden`}+ className={`min-h-[400px] relative group/day5step2 flex-1 flex flex-col items-center justify-between basis-1/2 lg:basis-1/3 border border-[#2E2E2E] rounded-xl bg-no-repeat p-14 text-2xl overflow-hidden`}><div className={`absolute top-0 right-0 w-full h-full -z-20`}><Image@@ -985,12 +981,10 @@ export default function launchweek() {/></div><div className="flex flex-col items-center gap-2 min-w-[300px]">- <Badge className="!bg-transparent h-fit text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-[#99bbab] to-[#396f55] border-[#4d898c] dark:from-white dark:to-[#1a7a4ca1] dark:border-[#DFFFF1]">+ <Badge className="!bg-transparent h-fit text-sm !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-white to-[#1a7a4ca1] border-[#DFFFF1]">Upgrade</Badge>- <span className="text-black dark:text-white text-center">- PostgREST 11- </span>+ <span className="text-white text-center">PostgREST 11</span></div><SectionButtonsdocs="/docs/guides/resources/supabase-cli"@@ -1011,11 +1005,11 @@ export default function launchweek() {<SectionContainer className="!pt-0 sm:!pb-20 !pb-40"><div className="flex flex-col mb-16"><Badge- className={`w-fit !bg-transparent !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-[#99bbab] to-[#396f55] dark:from-white dark:to-[#DFFFF1] h-fit relative mb-4 after:absolute after:rounded-full text-black after:bg-white after:w-full after:h-full after:top-0 after:right-0 after:bottom-0 after:left-0 after:bg-gradient-to-br after:from-[#dceef0] after:to-[#FFFFFF] dark:text-transparent dark:!border-[#163837] after:dark:from-[#14292c] after:dark:to-[#141516] after:border-[#c8d8d9] after:dark:border-[#1f3536] after:-z-10 border-[#DFFFF1]`}+ className={`w-fit !bg-transparent !py-1 !px-4 bg-clip-text bg-gradient-to-r from-white to-[#DFFFF1] h-fit relative mb-4 after:absolute after:rounded-full text-black after:bg-white after:w-full after:h-full after:top-0 after:right-0 after:bottom-0 after:left-0 after:bg-gradient-to-br text-transparent !border-[#163837] after:from-[#14292c] after:to-[#141516] after:border-[#1f3536] after:-z-10`}>Submissions Closed</Badge>- <h2 className="text-3xl text-black dark:text-white mb-2">Launch Week Hackathon</h2>+ <h2 className="text-3xl text-white mb-2">Launch Week Hackathon</h2><p className="text-slate-900 w-[80%] lg:w-[50%]">The traditional parallel Hackathon is back! Build a new open source project withSupabase and you can win $1500 in GitHub sponsorships and a coveted Supabase Darkmode@@ -1034,14 +1028,14 @@ export default function launchweek() {<div className="flex flex-col lg:flex-row gap-10 lg:gap-0"><div className="sm:grid grid-cols-2 grid-rows-2 gap-x-4 gap-y-7 sm:gap-y-10 basis-2/3 flex flex-col"><div className="flex flex-col">- <h3 className="text-lg text-black dark:text-white mb-2">Prizes</h3>+ <h3 className="text-lg text-white mb-2">Prizes</h3><p className="text-slate-900 w-[90%] lg:w-[80%]">There are 5 categories to win, with prizes for winners and runner-ups of eachcategory. Each team member gets a prize.</p></div><div className="flex flex-col">- <h3 className="text-lg text-black dark:text-white mb-2">Judges</h3>+ <h3 className="text-lg text-white mb-2">Judges</h3><p className="text-slate-900 w-[90%] lg:w-[80%]">The Supabase team will judge all the categories except the Best Edge FunctionsProject, which will be judged by our friends at Deno.@@ -1049,7 +1043,7 @@ export default function launchweek() {</div><div className="flex flex-col"><div className="flex flex-col">- <h3 className="text-lg text-black dark:text-white mb-2">Community</h3>+ <h3 className="text-lg text-white mb-2">Community</h3><p className="text-slate-900 w-[90%] lg:w-[80%]">If you need help or advice when building, find other people to join your team,or if you just want to chill and watch people build, come and join us!@@ -1066,7 +1060,7 @@ export default function launchweek() {</div></div><div className={'flex flex-col'}>- <h3 className="text-lg text-black dark:text-white mb-2">Submission</h3>+ <h3 className="text-lg text-white mb-2">Submission</h3><p className="text-slate-900 w-[90%] lg:w-[80%]">Submit your project through{' '}<a@@ -1083,7 +1077,8 @@ export default function launchweek() {</div><divclassName={classNames(- isDarkMode ? styles.dark_community : styles.community,+ // isDarkMode ? styles.dark_community : styles.community,+ styles.dark_community,'flex basis-1/3 flex-col px-5')}>@@ -1093,12 +1088,12 @@ export default function launchweek() {rel="noopener noreferrer"className="self-end">- <div className="border border-slate-400 dark:border-[#2E2E2E] rounded-xl pl-5 pr-9 py-4 mb-4 bg-white dark:bg-[#121212] w-fit relative max-w-[250px]">+ <div className="border border-[#2E2E2E] rounded-xl pl-5 pr-9 py-4 mb-4 bg-[#121212] w-fit relative max-w-[250px]"><imgsrc="/images/launchweek/link.svg"className="absolute top-[16px] right-[10px] text-brand-900"></img>- <h3 className="text-black dark:text-white">Supabase Cache Helpers</h3>+ <h3 className="text-white">Supabase Cache Helpers</h3><p className="text-slate-1000 text-xs">Previous Best Overall Project Winner</p></div></a>@@ -1107,12 +1102,12 @@ export default function launchweek() {target="_blank"rel="noopener noreferrer">- <div className="border border-slate-400 dark:border-[#2E2E2E] rounded-xl pl-5 pr-9 py-4 mb-4 bg-white dark:bg-[#121212] w-fit relative max-w-[250px]">+ <div className="border border-[#2E2E2E] rounded-xl pl-5 pr-9 py-4 mb-4 bg-[#121212] w-fit relative max-w-[250px]"><imgsrc="/images/launchweek/link.svg"className="absolute top-[16px] right-[10px] text-brand-900"></img>- <h3 className="text-black dark:text-white">Super UI</h3>+ <h3 className="text-white">Super UI</h3><p className="text-slate-1000 text-xs">Previous Best Overall Project Runner Up</p></div></a>@@ -1122,22 +1117,22 @@ export default function launchweek() {rel="noopener noreferrer"className="self-end">- <div className="border border-slate-400 dark:border-[#2E2E2E] rounded-xl pl-5 pr-9 py-4 mb-4 bg-white dark:bg-[#121212] w-fit relative max-w-[250px]">+ <div className="border border-[#2E2E2E] rounded-xl pl-5 pr-9 py-4 mb-4 bg-[#121212] w-fit relative max-w-[250px]"><imgsrc="/images/launchweek/link.svg"className="absolute top-[16px] right-[10px] text-brand-900"></img>- <h3 className="text-black dark:text-white">Quid Faciam Hodie?</h3>+ <h3 className="text-white">Quid Faciam Hodie?</h3><p className="text-slate-1000 text-xs">Winner Best Flutter Project</p></div></a><a href="https://github.com/laznic/hotdogs" target="_blank" rel="noopener noreferrer">- <div className="border border-slate-400 dark:border-[#2E2E2E] rounded-xl pl-5 pr-9 py-4 mb-4 bg-white dark:bg-[#121212] w-fit relative max-w-[250px]">+ <div className="border border-[#2E2E2E] rounded-xl pl-5 pr-9 py-4 mb-4 bg-[#121212] w-fit relative max-w-[250px]"><imgsrc="/images/launchweek/link.svg"className="absolute top-[16px] right-[10px] text-brand-900"></img>- <h3 className="text-black dark:text-white">That Hot Dog Game</h3>+ <h3 className="text-white">That Hot Dog Game</h3><p className="text-slate-1000 text-xs">Previous Winner: Most Fun/Interesting</p></div></a>@@ -1147,12 +1142,12 @@ export default function launchweek() {rel="noopener noreferrer"className="self-end">- <div className="border border-slate-400 dark:border-[#2E2E2E] rounded-xl pl-5 pr-9 py-4 bg-white dark:bg-[#121212] w-fit relative max-w-[250px]">+ <div className="border border-[#2E2E2E] rounded-xl pl-5 pr-9 py-4 bg-[#121212] w-fit relative max-w-[250px]"><imgsrc="/images/launchweek/link.svg"className="absolute top-[16px] right-[10px] text-brand-900"></img>- <h3 className="text-black dark:text-white">RepoWatch</h3>+ <h3 className="text-white">RepoWatch</h3><p className="text-slate-1000 text-xs">Previous Winner Best Realtime Project</p></div></a>@@ -1185,7 +1180,7 @@ export default function launchweek() {<div className="absolute -inset-0.5 bg-brand-1100 rounded-full opacity-75 group-hover:opacity-100 group-hover:blur-sm transition duration-500"></div><a href={creator.link} target="_blank" rel="noopener"><img- className="relative rounded-full w-12 h-12 border border-brand-900 hover:shadow-md"+ className="relative rounded-full w-12 h-12 border border-[#2E2E2E] border-brand-900 hover:shadow-md"src={creator.profile_picture}/></a>@@ -1196,15 +1191,15 @@ export default function launchweek() {</div><div className="flex-1"><Badge- className={`!bg-transparent !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-[#99bbab] to-[#396f55] !border-[#4d898c] dark:from-white dark:to-[#DFFFF1] dark:!border-[#DFFFF1] h-fit relative mb-4 ${+ className={`!bg-transparent !py-1 !px-4 text-transparent bg-clip-text bg-gradient-to-r from-white to-[#DFFFF1] !border-[#DFFFF1] h-fit relative mb-4 ${true- ? 'after:absolute after:rounded-full text-black after:bg-white after:w-full after:h-full after:top-0 after:right-0 after:bottom-0 after:left-0 after:bg-gradient-to-br after:from-[#dceef0] after:to-[#FFFFFF] dark:text-transparent dark:!border-[#163837] after:dark:from-[#14292c] after:dark:to-[#141516] after:border-[#c8d8d9] after:dark:border-[#1f3536] after:-z-10 border-[#DFFFF1]'+ ? 'after:absolute after:rounded-full after:bg-white after:w-full after:h-full after:top-0 after:right-0 after:bottom-0 after:left-0 after:bg-gradient-to-br text-transparent !border-[#163837] after:from-[#14292c] after:to-[#141516] after:border-[#1f3536] after:-z-10': ''}`}>Shipped</Badge>- <h2 className="text-3xl dark:text-white mb-2">The Supabase Content Storm</h2>+ <h2 className="text-3xl text-white mb-2">The Supabase Content Storm</h2><p className="text-slate-900 md:max-w-[80%] mb-16">We worked with more than 30 content creators from around the world to drop a mountainof content simultaneously!@@ -1217,7 +1212,7 @@ export default function launchweek() {</p>{activeCreator !== null && (<div className="lg:max-w-[50%] min-h-[120px]">- <h3 className="dark:text-white">+ <h3 className="text-white">{activeCreator !== null? `${creators[activeCreator].first_name} ${creators[activeCreator].last_name}`: 'Title'}diff --git a/apps/www/pages/launch-week/7/index.tsx b/apps/www/pages/launch-week/7/index.tsxnew file mode 100644index 00000000000..55c3b4348aa--- /dev/null+++ b/apps/www/pages/launch-week/7/index.tsx@@ -0,0 +1,104 @@+import { GetServerSideProps } from 'next'+import { NextSeo } from 'next-seo'+import { useEffect } from 'react'+import dynamic from 'next/dynamic'+import { createClient } from '@supabase/supabase-js'++import { SITE_ORIGIN, SITE_URL } from '~/lib/constants'++import DefaultLayout from '~/components/Layouts/Default'+import SectionContainer from '~/components/Layouts/SectionContainer'+import { LaunchWeekLogoHeader } from '~/components/LaunchWeek/7/LaunchSection/LaunchWeekLogoHeader'+import { UserData } from '~/components/LaunchWeek/hooks/use-conf-data'+import LW7BgGraphic from '~/components/LaunchWeek/7/LW7BgGraphic'+import { useTheme } from 'common/Providers'++const LW7Releases = dynamic(() => import('~/components/LaunchWeek/7/Releases'))+const LaunchWeekPrizeSection = dynamic(+ () => import('~/components/LaunchWeek/7/LaunchWeekPrizeSection')+)+const TicketBrickWall = dynamic(+ () => import('~/components/LaunchWeek/7/LaunchSection/TicketBrickWall')+)+const CTABanner = dynamic(() => import('~/components/CTABanner'))++interface Props {+ users: UserData[]+}++const supabaseAdmin = createClient(+ process.env.NEXT_PUBLIC_SUPABASE_URL ?? 'http://localhost:54321',+ process.env.SUPABASE_SERVICE_ROLE_SECRET ??+ process.env.NEXT_PUBLIC_SUPABASE_SERVICE_ROLE_SECRET ??+ ''+)++export default function TicketHome({ users }: Props) {+ const { isDarkMode, toggleTheme } = useTheme()++ const TITLE = 'Supabase LaunchWeek 7'+ const DESCRIPTION = 'Supabase Launch Week 7 | 10–14 April 2023'+ const OG_IMAGE = `${SITE_ORIGIN}/images/launchweek/seven/launch-week-7-teaser.jpg`++ useEffect(() => {+ toggleTheme(true)+ document.body.className = 'bg-[#1C1C1C]'+ return () => {+ document.body.className = ''+ isDarkMode ? toggleTheme(true) : toggleTheme(false)+ }+ }, [])++ return (+ <>+ <NextSeo+ title={TITLE}+ description={DESCRIPTION}+ openGraph={{+ title: TITLE,+ description: DESCRIPTION,+ url: SITE_URL,+ images: [+ {+ url: OG_IMAGE,+ },+ ],+ }}+ />+ <DefaultLayout>+ <div className="bg-[#1C1C1C] -mt-[65px]">+ <div className="relative bg-lw7 pt-16">+ <div className="relative z-10">+ <SectionContainer className="flex flex-col justify-around items-center !py-4 md:!py-8 gap-2 md:gap-4 !px-2 !mx-auto">+ <LaunchWeekLogoHeader />+ </SectionContainer>+ <LW7BgGraphic />+ </div>+ </div>++ <div className="relative !w-full max-w-[100vw] !px-4 sm:max-w-xl md:max-w-4xl lg:max-w-7xl -mt-48 md:mt-[-460px] z-20 flex flex-col justify-around items-center !py-4 md:!py-8 gap-2 md:gap-4 !mx-auto">+ <LW7Releases />+ <LaunchWeekPrizeSection className="pt-10" />+ </div>+ {users && <TicketBrickWall users={users} />}+ </div>+ <CTABanner />+ </DefaultLayout>+ </>+ )+}++export const getServerSideProps: GetServerSideProps = async ({ req, res }) => {+ // fetch users for the TicketBrickWall+ const { data: users } = await supabaseAdmin!+ .from('lw7_tickets_golden')+ .select('*')+ .order('createdAt', { ascending: false })+ .limit(17)++ return {+ props: {+ users,+ },+ }+}diff --git a/apps/www/pages/launch-week/7/tickets/[username].tsx b/apps/www/pages/launch-week/7/tickets/[username].tsxnew file mode 100644index 00000000000..7f74869f8b9--- /dev/null+++ b/apps/www/pages/launch-week/7/tickets/[username].tsx@@ -0,0 +1,166 @@+import { NextSeo } from 'next-seo'+import { GetStaticProps, GetStaticPaths } from 'next'+import Error from 'next/error'+import DefaultLayout from '~/components/Layouts/Default'+import SectionContainer from '~/components/Layouts/SectionContainer'+import TicketContainer from '~/components/LaunchWeek/7/Ticket/TicketContainer'+import { SITE_URL, SAMPLE_TICKET_NUMBER } from '~/lib/constants'+import { createClient } from '@supabase/supabase-js'+import { useEffect, useState } from 'react'+import { IconArrowDown } from 'ui'+import LaunchWeekPrizeSection from '~/components/LaunchWeek/7/LaunchWeekPrizeSection'+import { LaunchWeekLogoHeader } from '~/components/LaunchWeek/7/LaunchSection/LaunchWeekLogoHeader'+import TicketBrickWall from '~/components/LaunchWeek/7/LaunchSection/TicketBrickWall'+import { UserData } from '~/components/LaunchWeek/hooks/use-conf-data'+import LW7BgGraphic from '~/components/LaunchWeek/7/LW7BgGraphic'+import CTABanner from '~/components/CTABanner'+import { useTheme } from 'common/Providers'++interface Props {+ user: UserData+ users: UserData[]+ ogImageUrl: string+}++const supabaseAdmin = createClient(+ process.env.NEXT_PUBLIC_SUPABASE_URL ?? 'http://localhost:54321',+ process.env.SUPABASE_SERVICE_ROLE_SECRET ??+ process.env.NEXT_PUBLIC_SUPABASE_SERVICE_ROLE_SECRET ??+ ''+)++export default function UsernamePage({ user, users, ogImageUrl }: Props) {+ const { isDarkMode } = useTheme()+ const { username, ticketNumber, name, golden, referrals, bg_image_id } = user+ const TITLE = `${name ? name + '’s' : 'Get your'} #SupaLaunchWeek Ticket`+ const DESCRIPTION = 'Supabase Launch Week 7 | 10–14 April 2023 | Generate your ticket. Win swag.'+ const OG_URL = `${SITE_URL}/tickets/${username}`++ const [supabase] = useState(() =>+ createClient(process.env.NEXT_PUBLIC_SUPABASE_URL!, process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!)+ )++ if (!ticketNumber) {+ return <Error statusCode={404} />+ }++ useEffect(() => {+ document.body.className = '!dark bg-[#1C1C1C]'++ return () => {+ document.body.className = isDarkMode ? 'dark' : 'light'+ }+ }, [])++ return (+ <>+ <NextSeo+ title={TITLE}+ openGraph={{+ title: TITLE,+ description: DESCRIPTION,+ url: OG_URL,+ images: [+ {+ url: ogImageUrl,+ width: 1200,+ height: 630,+ },+ ],+ }}+ />+ <DefaultLayout>+ <div className="bg-[#1C1C1C] -mt-[65px]">+ <div className="relative bg-lw7 pt-20">+ <div className="relative z-10">+ <SectionContainer className="flex flex-col justify-around items-center !py-4 md:!py-8 gap-2 md:gap-4 !px-2 !mx-auto xl:h-[calc(90vh-65px)] min-h-[600px] md:min-h-[auto] lg:min-h-[650px]">+ <LaunchWeekLogoHeader />+ <TicketContainer+ supabase={supabase}+ session={null}+ defaultUserData={{+ username: username || undefined,+ name: name || '',+ ticketNumber,+ golden,+ referrals,+ bg_image_id,+ }}+ sharePage+ />+ <div>+ <a href="#lw-7-prizes" className="flex items-center text-white text-sm gap-4">+ See the prizes{' '}+ <span className="bounce-loop">+ <IconArrowDown w={10} h={12} />+ </span>+ </a>+ </div>+ </SectionContainer>+ <LW7BgGraphic />+ </div>+ <div className={['bg-lw7-gradient absolute inset-0 z-0', golden && 'gold'].join(' ')} />+ </div>+ <LaunchWeekPrizeSection className="-mt-20 md:-mt-60" />+ <TicketBrickWall users={users} />+ </div>+ <CTABanner />+ </DefaultLayout>+ </>+ )+}++export const getStaticProps: GetStaticProps = async ({ params }) => {+ const username = params?.username?.toString() || null+ let name: string | null | undefined+ let ticketNumber: number | null | undefined+ let golden = false+ let referrals = 0+ let bg_image_id+ let ogImageUrl++ // fetch users for the TicketBrickWall+ const { data: users } = await supabaseAdmin!.from('lw7_tickets_golden').select().limit(17)++ // fetch a specific user+ if (username) {+ const { data: user } = await supabaseAdmin!+ .from('lw7_tickets_golden')+ .select('name, ticketNumber, golden, referrals, bg_image_id')+ .eq('username', username)+ .single()+ name = user?.name+ ticketNumber = user?.ticketNumber+ golden = user?.golden ?? false+ bg_image_id = user?.bg_image_id ?? 1+ referrals = user?.referrals ?? 0+ ogImageUrl = `https://obuldanrptloktxcffvn.functions.supabase.co/lw7-ticket-og?username=${encodeURIComponent(+ username ?? ''+ )}${golden ? '&golden=true' : ''}`+ }++ return {+ props: {+ user: {+ username: ticketNumber ? username : null,+ usernameFromParams: username || null,+ name: ticketNumber ? name || username || null : null,+ ticketNumber: ticketNumber || SAMPLE_TICKET_NUMBER,+ golden,+ referrals,+ bg_image_id,+ },+ ogImageUrl,+ users,+ key: username,+ },+ revalidate: 5,+ }+}++export const getStaticPaths: GetStaticPaths = async () => {+ return Promise.resolve({+ paths: [],+ fallback: 'blocking',+ })+}diff --git a/apps/www/pages/launch-week/7/tickets/index.tsx b/apps/www/pages/launch-week/7/tickets/index.tsxnew file mode 100644index 00000000000..61b1b0cd3a6--- /dev/null+++ b/apps/www/pages/launch-week/7/tickets/index.tsx@@ -0,0 +1,181 @@+import { NextSeo } from 'next-seo'+import { GetServerSideProps } from 'next'+import DefaultLayout from '~/components/Layouts/Default'+import SectionContainer from '~/components/Layouts/SectionContainer'+import { SITE_ORIGIN, SITE_URL } from '~/lib/constants'+import { createClient } from '@supabase/supabase-js'+import { useEffect, useRef, useState } from 'react'+import { LaunchWeekLogoHeader } from '~/components/LaunchWeek/7/LaunchSection/LaunchWeekLogoHeader'+import { motion } from 'framer-motion'+import { UserData } from '~/components/LaunchWeek/hooks/use-conf-data'+import LW7BgGraphic from '~/components/LaunchWeek/7/LW7BgGraphic'+import CTABanner from '~/components/CTABanner'+import { debounce } from 'lodash'+import TicketsGrid from '~/components/LaunchWeek/7/TicketsGrid'+import { Button } from 'ui'+import Link from 'next/link'+import { useTheme } from 'common/Providers'++interface Props {+ users: UserData[]+}++const supabaseAdmin = createClient(+ process.env.NEXT_PUBLIC_SUPABASE_URL ?? 'http://localhost:54321',+ process.env.SUPABASE_SERVICE_ROLE_SECRET ??+ process.env.NEXT_PUBLIC_SUPABASE_SERVICE_ROLE_SECRET ??+ ''+)++const generateOgs = async (users: UserData[]) => {+ users?.map(async (user) => {+ const ogImageUrl = `https://obuldanrptloktxcffvn.functions.supabase.co/lw7-ticket-og?username=${encodeURIComponent(+ user.username ?? ''+ )}${!!user.golden ? '&golden=true' : ''}`+ return await fetch(ogImageUrl)+ })+}++export default function TicketsPage({ users }: Props) {+ const ref = useRef(null)+ const PAGE_COUNT = 20+ const TITLE = '#SupaLaunchWeek Tickets'+ const DESCRIPTION = 'Supabase Launch Week 7 | 10–14 April 2023'+ const OG_IMAGE = `${SITE_ORIGIN}/images/launchweek/seven/launch-week-7-teaser.jpg`++ const { isDarkMode } = useTheme()+ const [isLoading, setIsLoading] = useState(false)+ const [offset, setOffset] = useState(1)+ const [isLast, setIsLast] = useState(false)+ const [hasLoaded, setHasLoaded] = useState(false)+ const [loadedUsers, setLoadedUsers] = useState<any[]>(users)++ useEffect(() => {+ loadMoreUsers(offset)+ }, [hasLoaded])++ const loadUsers = async (offset: number) => {+ const from = offset * PAGE_COUNT+ return await supabaseAdmin!+ .from('lw7_tickets_golden')+ .select('*')+ .range(from, from + PAGE_COUNT - 1)+ .order('createdAt', { ascending: false })+ }++ const loadMoreUsers = async (offset: number) => {+ if (isLast) return+ setIsLoading(true)+ setOffset((prev) => prev + 1)+ const { data: users } = await loadUsers(offset)+ setLoadedUsers((prevUsers) => [...prevUsers, ...(users as any[])])+ if ((users as any[]).length < PAGE_COUNT) setIsLast(true)+ setIsLoading(false)+ }++ const handleScroll = () => {+ if (ref.current && typeof window !== 'undefined') {+ const rect = (ref.current as HTMLDivElement)?.getBoundingClientRect()+ const isInView = rect.bottom <= (window.innerHeight || document.documentElement.clientHeight)+ setHasLoaded((prev) => !prev && isInView)+ }+ }++ useEffect(() => {+ document.body.className = '!dark bg-[#1C1C1C]'++ const handleDebouncedScroll = debounce(() => !isLast && handleScroll(), 200)+ window.addEventListener('scroll', handleDebouncedScroll)++ return () => {+ document.body.className = isDarkMode ? 'dark' : 'light'+ window.removeEventListener('scroll', handleDebouncedScroll)+ }+ }, [])++ return (+ <>+ <NextSeo+ title={TITLE}+ openGraph={{+ title: TITLE,+ description: DESCRIPTION,+ url: `${SITE_URL}/tickets`,+ images: [+ {+ url: OG_IMAGE,+ },+ ],+ }}+ />+ <DefaultLayout>+ <div className="bg-[#1C1C1C] -mt-[65px]">+ <div className="relative bg-lw7 pt-20">+ <div className="relative z-10">+ <SectionContainer className="flex flex-col justify-around items-center !py-4 md:!py-8 gap-2 md:gap-4 !px-2 !mx-auto h-auto">+ <LaunchWeekLogoHeader />+ </SectionContainer>+ <LW7BgGraphic />+ </div>+ <div className="bg-lw7-gradient absolute inset-0 z-0" />+ </div>+ <SectionContainer className="z-10 -mt-60 md:-mt-[500px] max-w-none overflow-hidden">+ <div className="text-center relative z-10 text-white mb-4 lg:mb-10">+ <motion.div+ className="max-w-[38rem] mx-auto px-4 flex flex-col items-center gap-4"+ initial={{ y: -20, opacity: 0 }}+ whileInView={{ y: 0, opacity: 1 }}+ viewport={{ once: true, margin: '-150px' }}+ transition={{ type: 'spring', bounce: 0, delay: 0.2 }}+ >+ <h2 className="text-4xl">+ Check out <span className="gradient-text-pink-500">all the tickets</span>+ </h2>+ <p className="radial-gradient-text-scale-500">+ Join us on April 16th for Launch Week 7's final day{' '}+ <br className="hidden md:inline-block" /> and find out if you are one of the lucky+ winners. Get sharing!+ </p>+ <div className="mt-1">+ <Link href="/launch-week/7">+ <a>+ <Button type="outline" size="medium">+ Go to Launch Week 7+ </Button>+ </a>+ </Link>+ </div>+ </motion.div>+ </div>+ <div ref={ref}>+ <TicketsGrid+ loadedUsers={loadedUsers}+ isLoading={isLoading}+ pageCount={PAGE_COUNT}+ offset={offset}+ />+ </div>+ </SectionContainer>+ </div>+ <CTABanner />+ </DefaultLayout>+ </>+ )+}++export const getServerSideProps: GetServerSideProps = async ({ req, res }) => {+ const { data: users } = await supabaseAdmin!+ .from('lw7_tickets_golden')+ .select('*')+ .order('createdAt', { ascending: false })+ .limit(20)++ // Generate og images of not present+ generateOgs(users as any[])++ return {+ props: {+ users,+ },+ }+}diff --git a/apps/www/pages/launch-week/index.tsx b/apps/www/pages/launch-week/index.tsxindex 8e12bacdf8e..da8706c61d2 100644--- a/apps/www/pages/launch-week/index.tsx+++ b/apps/www/pages/launch-week/index.tsx@@ -1,35 +1,39 @@import { GetServerSideProps } from 'next'import { NextSeo } from 'next-seo'import { useState, useEffect } from 'react'+import Image from 'next/image'import dynamic from 'next/dynamic'import { useRouter } from 'next/router'import { createClient, Session, SupabaseClient } from '@supabase/supabase-js'-import { SITE_ORIGIN, SITE_URL } from '~/lib/constants'+import { PageState, ConfDataContext, UserData } from '~/components/LaunchWeek/hooks/use-conf-data'import DefaultLayout from '~/components/Layouts/Default'import SectionContainer from '~/components/Layouts/SectionContainer'-import { LaunchWeekLogoHeader } from '~/components/LaunchWeek/LaunchSection/LaunchWeekLogoHeader'-import { UserData } from '~/components/LaunchWeek/Ticket/hooks/use-conf-data'-import LW7BgGraphic from '~/components/LaunchWeek/LW7BgGraphic'+import { LaunchWeekLogoHeader } from '~/components/LaunchWeek/8/LaunchWeekLogoHeader'+import { useTheme } from 'common/Providers'-const TicketContainer = dynamic(() => import('~/components/LaunchWeek/Ticket/TicketContainer'))-const LW7Releases = dynamic(() => import('~/components/LaunchWeek/Releases/LW7/LW7Releases'))-const LaunchWeekPrizeSection = dynamic(- () => import('~/components/LaunchWeek/LaunchSection/LaunchWeekPrizeSection')+import 'swiper/swiper.min.css'+import Head from 'next/head'++const AnimatedParticles = dynamic(+ () => import('~/components/LaunchWeek/8/AnimatedParticles/ParticlesCanvas'))-const TicketBrickWall = dynamic(- () => import('~/components/LaunchWeek/LaunchSection/TicketBrickWall')+const TicketContainer = dynamic(() => import('~/components/LaunchWeek/8/Ticket/TicketContainer'))+const LaunchWeekPrizeSection = dynamic(+ () => import('~/components/LaunchWeek/8/LaunchWeekPrizeSection'))+const TicketBrickWall = dynamic(() => import('~/components/LaunchWeek/8/TicketBrickWall'))const CTABanner = dynamic(() => import('~/components/CTABanner'))interface Props {- users: UserData[]+ users?: UserData[]}const supabaseAdmin = createClient(process.env.NEXT_PUBLIC_SUPABASE_URL ?? 'http://localhost:54321',+ // ANON KEYprocess.env.SUPABASE_SERVICE_ROLE_SECRET ??process.env.NEXT_PUBLIC_SUPABASE_SERVICE_ROLE_SECRET ??'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im9idWxkYW5ycHRsb2t0eGNmZnZuIiwicm9sZSI6ImFub24iLCJpYXQiOjE2Njk3MjcwMTIsImV4cCI6MTk4NTMwMzAxMn0.SZLqryz_-stF8dgzeVXmzZWPOqdOrBwqJROlFES8v3I'@@ -37,15 +41,16 @@ const supabaseAdmin = createClient(export default function TicketHome({ users }: Props) {const { query } = useRouter()- const [supabase, setSupabase] = useState<SupabaseClient | null>(null)- const [session, setSession] = useState<Session | null>(null)- const { isDarkMode } = useTheme()- const TITLE = 'Supabase LaunchWeek 7'- const DESCRIPTION = 'Supabase Launch Week 7 | 10–14 April 2023'- const OG_IMAGE = `${SITE_ORIGIN}/images/launchweek/seven/launch-week-7-teaser.jpg`+ const TITLE = 'Supabase LaunchWeek 8'+ const DESCRIPTION = 'Supabase Launch Week 8 | 7–11 August 2023'+ const OG_IMAGE = `${SITE_ORIGIN}/images/launchweek/8/lw8-og.jpg`+const ticketNumber = query.ticketNumber?.toString()const bgImageId = query.bgImageId?.toString()+ const [supabase, setSupabase] = useState<SupabaseClient | null>(null)+ const [session, setSession] = useState<Session | null>(null)+ const { isDarkMode, toggleTheme } = useTheme()const defaultUserData = {id: query.id?.toString(),@@ -56,6 +61,9 @@ export default function TicketHome({ users }: Props) {bgImageId: bgImageId ? parseInt(bgImageId, 10) : undefined,}+ const [userData, setUserData] = useState<UserData>(defaultUserData)+ const [pageState, setPageState] = useState<PageState>('ticket')+useEffect(() => {if (!supabase) {setSupabase(@@ -81,24 +89,14 @@ export default function TicketHome({ users }: Props) {}, [supabase])useEffect(() => {- document.body.className = '!dark bg-[#1C1C1C]'+ toggleTheme(true)+ document.body.className = 'dark bg-[#020405]'return () => {- document.body.className = isDarkMode ? 'dark' : 'light'+ document.body.className = ''+ isDarkMode ? toggleTheme(true) : toggleTheme(false)}}, [])- const Ticket = () =>- supabase && (- <div className="w-full max-w-[100vw] px-4 flex justify-center py-8 md:py-20">- <TicketContainer- supabase={supabase}- session={session}- defaultUserData={defaultUserData}- defaultPageState="ticket"- />- </div>- )-return (<><NextSeo@@ -115,25 +113,73 @@ export default function TicketHome({ users }: Props) {],}}/>- <DefaultLayout>- <div className="bg-[#1C1C1C] -mt-[65px]">- <div className="relative bg-lw7 pt-16">- <div className="relative z-10">- <SectionContainer className="flex flex-col justify-around items-center !py-4 md:!py-8 gap-2 md:gap-4 !px-2 !mx-auto">- <LaunchWeekLogoHeader />- </SectionContainer>- <LW7BgGraphic />+ <Head>+ <meta+ name="viewport"+ content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"+ />+ </Head>+ <ConfDataContext.Provider+ value={{+ supabase,+ session,+ userData,+ setUserData,+ setPageState,+ }}+ >+ <DefaultLayout>+ <div className="-mt-[65px]">+ <div className="relative">+ <div className="relative z-10">+ <SectionContainer className="relative flex flex-col justify-around items-center min-h-[600px] lg:min-h-[600px] !py-4 md:!py-8 lg:!pb-0 gap-2 md:gap-4 !px-0 !mx-auto">+ <div className="absolute bottom-0 z-10 w-full justify-center flex items-end">+ <LaunchWeekLogoHeader />+ </div>+ <div className="absolute inset-0 z-0">+ {supabase && <AnimatedParticles supabase={supabase} users={users} />}+ <Image+ src="/images/launchweek/8/stars.svg"+ alt="starts background"+ layout="fill"+ objectFit="cover"+ className="opacity-70"+ draggable={false}+ />+ </div>+ </SectionContainer>+ <div className="absolute w-full aspect-[1/1] md:aspect-[1.5/1] lg:aspect-[2.5/1] inset-0 z-0">+ <Image+ src="/images/launchweek/8/LW8-gradient.png"+ layout="fill"+ objectFit="cover"+ objectPosition="top"+ priority+ draggable={false}+ />+ </div>+ </div></div>- </div>- <div className="relative !w-full max-w-[100vw] !px-4 sm:max-w-xl md:max-w-4xl lg:max-w-7xl -mt-48 md:mt-[-460px] z-20 flex flex-col justify-around items-center !py-4 md:!py-8 gap-2 md:gap-4 !mx-auto">- <LW7Releases />- <LaunchWeekPrizeSection className="pt-10" ticket={Ticket} />+ <div className="relative !w-full max-w-[100vw] min-h-[400px] !px-4 sm:max-w-xl md:max-w-4xl lg:max-w-7xl z-20 flex flex-col justify-around items-center !py-4 md:!py-8 lg:!pb-0 gap-2 md:gap-4 !mx-auto">+ {supabase && (+ <div className="w-full max-w-[100vw] px-4 flex justify-center py-8 md:py-20">+ <TicketContainer+ user={userData}+ referrals={userData.referrals ?? 0}+ supabase={supabase}+ />+ </div>+ )}+ </div>+ <SectionContainer className="!pt-8 !px-4 w-full">+ <LaunchWeekPrizeSection className="" />+ </SectionContainer>+ {users && <TicketBrickWall users={users.slice(0, 17)} />}</div>- {users && <TicketBrickWall users={users} />}- </div>- <CTABanner />- </DefaultLayout>+ <CTABanner className="!bg-[#020405] border-t-0" />+ </DefaultLayout>+ </ConfDataContext.Provider></>)}@@ -141,10 +187,8 @@ export default function TicketHome({ users }: Props) {export const getServerSideProps: GetServerSideProps = async ({ req, res }) => {// fetch users for the TicketBrickWallconst { data: users } = await supabaseAdmin!- .from('lw7_tickets_golden')- .select('*')- .order('createdAt', { ascending: false })- .limit(17)+ .from('lw8_tickets_golden')+ .select('username, golden', { count: 'exact' })return {props: {diff --git a/apps/www/pages/launch-week/launchWeek.css b/apps/www/pages/launch-week/launchWeek.cssindex bfd8b1b9187..d07b25683f7 100644--- a/apps/www/pages/launch-week/launchWeek.css+++ b/apps/www/pages/launch-week/launchWeek.css@@ -1,5 +1,4 @@.bg-lw7 {- /* background: radial-gradient(72.03% 66.03% at 50% 69.72%, #3fcf8e 0%, #9e44ef 100%); */background: #9e44ef;}@@ -8,23 +7,13 @@}.bg-lw7-gradient {- /* background: radial-gradient(72.03% 66.03% at 50% 69.72%, #3fcf8e 0%, transparent 100%); */background: radial-gradient(80% 65% at 50% 95%, #dbb8bf 0%, transparent 100%);}-/* .bg-lw7-gradient.gold {- background: radial-gradient(80% 65% at 50% 95%, #ffd132 0%, transparent 100%);-} */-@media (min-width: 768px) {.bg-lw7-gradient {- /* background: radial-gradient(72.03% 66.03% at 50% 69.72%, #3fcf8e 0%, transparent 100%); */background: radial-gradient(72.03% 66.03% at 50% 69.72%, #dbb8bf 0%, transparent 100%);}-- /* .bg-lw7-gradient.gold {- background: radial-gradient(72.03% 70% at 50% 75%, #ffd132 0%, transparent 100%);- } */}.opacity-pulse {diff --git a/apps/www/pages/launch-week/tickets/[username].tsx b/apps/www/pages/launch-week/tickets/[username].tsxindex 07061ff48fc..c246ce203c9 100644--- a/apps/www/pages/launch-week/tickets/[username].tsx+++ b/apps/www/pages/launch-week/tickets/[username].tsx@@ -1,20 +1,23 @@+import { useEffect, useState } from 'react'import { NextSeo } from 'next-seo'import { GetStaticProps, GetStaticPaths } from 'next'+import Image from 'next/image'import Error from 'next/error'+import dynamic from 'next/dynamic'+import { Session, SupabaseClient, createClient } from '@supabase/supabase-js'+import { useTheme } from 'common/Providers'+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 { createClient } from '@supabase/supabase-js'-import { useEffect, useState } from 'react'-import { IconArrowDown } from 'ui'-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'-import LW7BgGraphic from '../../../components/LaunchWeek/LW7BgGraphic'-import CTABanner from '../../../components/CTABanner'-import { useTheme } from 'common/Providers'+import TicketContainer from '~/components/LaunchWeek/8/Ticket/TicketContainer'+import { SITE_URL } from '~/lib/constants'+import { PageState, ConfDataContext, UserData } from '~/components/LaunchWeek/hooks/use-conf-data'++const LaunchWeekPrizeSection = dynamic(+ () => import('~/components/LaunchWeek/8/LaunchWeekPrizeSection')+)+const TicketBrickWall = dynamic(() => import('~/components/LaunchWeek/8/TicketBrickWall'))+const CTABanner = dynamic(() => import('~/components/CTABanner'))interface Props {user: UserData@@ -24,31 +27,47 @@ interface Props {const supabaseAdmin = createClient(process.env.NEXT_PUBLIC_SUPABASE_URL ?? 'http://localhost:54321',+ // ANON KEYprocess.env.SUPABASE_SERVICE_ROLE_SECRET ??process.env.NEXT_PUBLIC_SUPABASE_SERVICE_ROLE_SECRET ??'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im9idWxkYW5ycHRsb2t0eGNmZnZuIiwicm9sZSI6ImFub24iLCJpYXQiOjE2Njk3MjcwMTIsImV4cCI6MTk4NTMwMzAxMn0.SZLqryz_-stF8dgzeVXmzZWPOqdOrBwqJROlFES8v3I')export default function UsernamePage({ user, users, ogImageUrl }: Props) {- const { isDarkMode } = useTheme()- const { username, ticketNumber, name, golden, referrals, bg_image_id } = user+ const { username, ticketNumber, name } = user+const TITLE = `${name ? name + '’s' : 'Get your'} #SupaLaunchWeek Ticket`- const DESCRIPTION = 'Supabase Launch Week 7 | 10–14 April 2023 | Generate your ticket. Win swag.'+ const DESCRIPTION =+ 'Supabase Launch Week 8 | 7–11 August 2023 | Generate your ticket & win awesome swag.'const OG_URL = `${SITE_URL}/tickets/${username}`- const [supabase] = useState(() =>- createClient(process.env.NEXT_PUBLIC_SUPABASE_URL!, process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!)- )+ const [supabase, setSupabase] = useState<SupabaseClient | null>(null)+ const [session, setSession] = useState<Session | null>(null)+ const { isDarkMode, toggleTheme } = useTheme()++ const [pageState, setPageState] = useState<PageState>('ticket')if (!ticketNumber) {return <Error statusCode={404} />}useEffect(() => {- document.body.className = '!dark bg-[#1C1C1C]'+ if (!supabase) {+ setSupabase(+ createClient(+ process.env.NEXT_PUBLIC_SUPABASE_URL!,+ process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!+ )+ )+ }+ }, [])+ useEffect(() => {+ toggleTheme(true)+ document.body.className = 'dark bg-[#020405]'return () => {- document.body.className = isDarkMode ? 'dark' : 'light'+ document.body.className = ''+ isDarkMode ? toggleTheme(true) : toggleTheme(false)}}, [])@@ -69,86 +88,90 @@ export default function UsernamePage({ user, users, ogImageUrl }: Props) {],}}/>- <DefaultLayout>- <div className="bg-[#1C1C1C] -mt-[65px]">- <div className="relative bg-lw7 pt-20">- <div className="relative z-10">- <SectionContainer className="flex flex-col justify-around items-center !py-4 md:!py-8 gap-2 md:gap-4 !px-2 !mx-auto xl:h-[calc(90vh-65px)] min-h-[600px] md:min-h-[auto] lg:min-h-[650px]">- <LaunchWeekLogoHeader />- <TicketContainer- supabase={supabase}- session={null}- defaultUserData={{- username: username || undefined,- name: name || '',- ticketNumber,- golden,- referrals,- bg_image_id,- }}- sharePage- />- <div>- <a href="#lw-7-prizes" className="flex items-center text-white text-sm gap-4">- See the prizes{' '}- <span className="bounce-loop">- <IconArrowDown w={10} h={12} />- </span>- </a>+ <ConfDataContext.Provider+ value={{+ supabase,+ session,+ userData: user,+ setUserData: () => null,+ setPageState,+ }}+ >+ <DefaultLayout>+ <div className="-mt-[65px]">+ <div className="relative">+ <div className="relative z-10">+ <SectionContainer className="relative z-10 flex flex-col justify-around items-center gap-2 lg:!pb-0 md:gap-4 !px-2 !mx-auto md:min-h-[auto]">+ <div className="pt-12 lg:pt-24">+ {supabase && (+ <TicketContainer+ user={user}+ referrals={user.referrals ?? 0}+ supabase={supabase}+ sharePage+ />+ )}+ </div>+ </SectionContainer>+ <div className="absolute w-full aspect-[1/1] md:aspect-[1.5/1] lg:aspect-[2.5/1] inset-0 z-0">+ <Image+ src="/images/launchweek/8/LW8-gradient.png"+ layout="fill"+ objectFit="cover"+ objectPosition="top"+ priority+ draggable={false}+ /></div>- </SectionContainer>- <LW7BgGraphic />+ </div></div>- <div className={['bg-lw7-gradient absolute inset-0 z-0', golden && 'gold'].join(' ')} />+ <SectionContainer className="">+ <LaunchWeekPrizeSection />+ </SectionContainer>+ {users && <TicketBrickWall users={users.slice(0, 17)} />}</div>- <LaunchWeekPrizeSection className="-mt-20 md:-mt-60" />- <TicketBrickWall users={users} />- </div>- <CTABanner />- </DefaultLayout>+ <CTABanner className="!bg-[#020405] border-t-0" />+ </DefaultLayout>+ </ConfDataContext.Provider></>)}export const getStaticProps: GetStaticProps = async ({ params }) => {const username = params?.username?.toString() || null- let name: string | null | undefined- let ticketNumber: number | null | undefined- let golden = false- let referrals = 0- let bg_image_id- let ogImageUrl+ let user// fetch users for the TicketBrickWall- const { data: users } = await supabaseAdmin!.from('lw7_tickets_golden').select().limit(17)+ const { data: users } = await supabaseAdmin!.from('lw8_tickets_golden').select().limit(17)++ fetch(+ `https://obuldanrptloktxcffvn.functions.supabase.co/lw8-ticket?username=${encodeURIComponent(+ username ?? ''+ )}`+ ).catch((_) => {})// fetch a specific userif (username) {- const { data: user } = await supabaseAdmin!- .from('lw7_tickets_golden')- .select('name, ticketNumber, golden, referrals, bg_image_id')+ const { data } = await supabaseAdmin!+ .from('lw8_tickets_golden')+ .select('name, username, ticketNumber, metadata, golden').eq('username', username).single()- name = user?.name- ticketNumber = user?.ticketNumber- golden = user?.golden ?? false- bg_image_id = user?.bg_image_id ?? 1- referrals = user?.referrals ?? 0- ogImageUrl = `https://obuldanrptloktxcffvn.functions.supabase.co/lw7-ticket-og?username=${encodeURIComponent(- username ?? ''- )}${golden ? '&golden=true' : ''}`++ user = data}+ const BUCKET_FOLDER_VERSION = 'v1'++ const ogImageUrl = `https://obuldanrptloktxcffvn.supabase.co/storage/v1/object/public/images/lw8/og/${+ user?.golden ? 'golden' : 'regular'+ }/${BUCKET_FOLDER_VERSION}/${username}.png`+return {props: {user: {- username: ticketNumber ? username : null,- usernameFromParams: username || null,- name: ticketNumber ? name || username || null : null,- ticketNumber: ticketNumber || SAMPLE_TICKET_NUMBER,- golden,- referrals,- bg_image_id,+ ...user,+ username,},ogImageUrl,users,diff --git a/apps/www/pages/launch-week/tickets/index.tsx b/apps/www/pages/launch-week/tickets/index.tsxindex 84e7d8234d0..bd8b573b75b 100644--- a/apps/www/pages/launch-week/tickets/index.tsx+++ b/apps/www/pages/launch-week/tickets/index.tsx@@ -1,21 +1,21 @@-import { NextSeo } from 'next-seo'-import { GetServerSideProps } from 'next'-import DefaultLayout from '~/components/Layouts/Default'-import SectionContainer from '~/components/Layouts/SectionContainer'-import { SITE_ORIGIN, SITE_URL } from '~/lib/constants'-import { createClient } from '@supabase/supabase-js'import { useEffect, useRef, useState } from 'react'-import { LaunchWeekLogoHeader } from '~/components/LaunchWeek/LaunchSection/LaunchWeekLogoHeader'-import { motion } from 'framer-motion'-import { UserData } from '~/components/LaunchWeek/Ticket/hooks/use-conf-data'-import LW7BgGraphic from '../../../components/LaunchWeek/LW7BgGraphic'-import CTABanner from '../../../components/CTABanner'-import { debounce } from 'lodash'-import TicketsGrid from '../../../components/LaunchWeek/Ticket/TicketsGrid'+import { GetServerSideProps } from 'next'+import { NextSeo } from 'next-seo'+import Image from 'next/image'import { Button } from 'ui'import Link from 'next/link'+import { motion } from 'framer-motion'+import { createClient } from '@supabase/supabase-js'++import { SITE_ORIGIN, SITE_URL } from '~/lib/constants'import { useTheme } from 'common/Providers'+import DefaultLayout from '~/components/Layouts/Default'+import SectionContainer from '~/components/Layouts/SectionContainer'+import { UserData } from '~/components/LaunchWeek/hooks/use-conf-data'+import CTABanner from '~/components/CTABanner'+import TicketsGrid from '~/components/LaunchWeek/8/TicketsGrid'+interface Props {users: UserData[]}@@ -29,7 +29,7 @@ const supabaseAdmin = createClient(const generateOgs = async (users: UserData[]) => {users?.map(async (user) => {- const ogImageUrl = `https://obuldanrptloktxcffvn.functions.supabase.co/lw7-ticket-og?username=${encodeURIComponent(+ const ogImageUrl = `https://obuldanrptloktxcffvn.functions.supabase.co/lw8-ticket-og?username=${encodeURIComponent(user.username ?? '')}${!!user.golden ? '&golden=true' : ''}`return await fetch(ogImageUrl)@@ -40,10 +40,10 @@ export default function TicketsPage({ users }: Props) {const ref = useRef(null)const PAGE_COUNT = 20const TITLE = '#SupaLaunchWeek Tickets'- const DESCRIPTION = 'Supabase Launch Week 7 | 10–14 April 2023'- const OG_IMAGE = `${SITE_ORIGIN}/images/launchweek/seven/launch-week-7-teaser.jpg`+ const DESCRIPTION = 'Supabase Launch Week 8 | 7–11 August 2023'+ const OG_IMAGE = `${SITE_ORIGIN}/images/launchweek/8/lw8-og.jpg`- const { isDarkMode } = useTheme()+ const { isDarkMode, toggleTheme } = useTheme()const [isLoading, setIsLoading] = useState(false)const [offset, setOffset] = useState(1)const [isLast, setIsLast] = useState(false)@@ -57,7 +57,7 @@ export default function TicketsPage({ users }: Props) {const loadUsers = async (offset: number) => {const from = offset * PAGE_COUNTreturn await supabaseAdmin!- .from('lw7_tickets_golden')+ .from('lw8_tickets_golden').select('*').range(from, from + PAGE_COUNT - 1).order('createdAt', { ascending: false })@@ -82,14 +82,11 @@ export default function TicketsPage({ users }: Props) {}useEffect(() => {- document.body.className = '!dark bg-[#1C1C1C]'-- const handleDebouncedScroll = debounce(() => !isLast && handleScroll(), 200)- window.addEventListener('scroll', handleDebouncedScroll)-+ toggleTheme(true)+ document.body.className = 'dark bg-[#020405]'return () => {- document.body.className = isDarkMode ? 'dark' : 'light'- window.removeEventListener('scroll', handleDebouncedScroll)+ document.body.className = ''+ isDarkMode ? toggleTheme(true) : toggleTheme(false)}}, [])@@ -109,17 +106,8 @@ export default function TicketsPage({ users }: Props) {}}/><DefaultLayout>- <div className="bg-[#1C1C1C] -mt-[65px]">- <div className="relative bg-lw7 pt-20">- <div className="relative z-10">- <SectionContainer className="flex flex-col justify-around items-center !py-4 md:!py-8 gap-2 md:gap-4 !px-2 !mx-auto h-auto">- <LaunchWeekLogoHeader />- </SectionContainer>- <LW7BgGraphic />- </div>- <div className="bg-lw7-gradient absolute inset-0 z-0" />- </div>- <SectionContainer className="z-10 -mt-60 md:-mt-[500px] max-w-none overflow-hidden">+ <div className="">+ <SectionContainer className="z-10"><div className="text-center relative z-10 text-white mb-4 lg:mb-10"><motion.divclassName="max-w-[38rem] mx-auto px-4 flex flex-col items-center gap-4"@@ -128,19 +116,17 @@ export default function TicketsPage({ users }: Props) {viewport={{ once: true, margin: '-150px' }}transition={{ type: 'spring', bounce: 0, delay: 0.2 }}>- <h2 className="text-4xl">- Check out <span className="gradient-text-pink-500">all the tickets</span>- </h2>- <p className="radial-gradient-text-scale-500">- Join us on April 16th for Launch Week 7's final day{' '}+ <h2 className="text-4xl">Launch Week 8 tickets</h2>+ <p className="text-[#9296AA]">+ Join us on August 11th for Launch Week 8's final day{' '}<br className="hidden md:inline-block" /> and find out if you are one of the lucky- winners. Get sharing!+ winners.</p><div className="mt-1"><Link href="/launch-week"><a><Button type="outline" size="medium">- Go to Launch Week 7+ Go to Launch Week 8</Button></a></Link>@@ -156,8 +142,18 @@ export default function TicketsPage({ users }: Props) {/></div></SectionContainer>+ <div className="absolute w-full aspect-[1/1] md:aspect-[1.5/1] lg:aspect-[2.5/1] inset-0 z-0">+ <Image+ src="/images/launchweek/8/LW8-gradient.png"+ layout="fill"+ objectFit="cover"+ objectPosition="top"+ priority+ draggable={false}+ />+ </div></div>- <CTABanner />+ <CTABanner className="!bg-[#020405] border-t-0" /></DefaultLayout></>)@@ -165,7 +161,7 @@ export default function TicketsPage({ users }: Props) {export const getServerSideProps: GetServerSideProps = async ({ req, res }) => {const { data: users } = await supabaseAdmin!- .from('lw7_tickets_golden')+ .from('lw8_tickets_golden').select('*').order('createdAt', { ascending: false }).limit(20)diff --git a/apps/www/public/images/launchweek/8/LW8-gradient.png b/apps/www/public/images/launchweek/8/LW8-gradient.pngnew file mode 100644index 00000000000..5ac9a61d922Binary files /dev/null and b/apps/www/public/images/launchweek/8/LW8-gradient.png differdiff --git a/apps/www/public/images/launchweek/8/lw8-logo-gold.png b/apps/www/public/images/launchweek/8/lw8-logo-gold.pngnew file mode 100644index 00000000000..51f85e84265Binary files /dev/null and b/apps/www/public/images/launchweek/8/lw8-logo-gold.png differdiff --git a/apps/www/public/images/launchweek/8/lw8-logo.png b/apps/www/public/images/launchweek/8/lw8-logo.pngnew file mode 100644index 00000000000..8a6722e759fBinary files /dev/null and b/apps/www/public/images/launchweek/8/lw8-logo.png differdiff --git a/apps/www/public/images/launchweek/8/lw8-og.jpg b/apps/www/public/images/launchweek/8/lw8-og.jpgnew file mode 100644index 00000000000..49cbefc13beBinary files /dev/null and b/apps/www/public/images/launchweek/8/lw8-og.jpg differdiff --git a/apps/www/public/images/launchweek/8/prize-icon.svg b/apps/www/public/images/launchweek/8/prize-icon.svgnew file mode 100644index 00000000000..238b8c2c317--- /dev/null+++ b/apps/www/public/images/launchweek/8/prize-icon.svg@@ -0,0 +1,19 @@+<svg width="61" height="57" viewBox="0 0 61 57" fill="none" xmlns="http://www.w3.org/2000/svg">+<rect x="1.99414" y="1.32422" width="57.3802" height="53.7812" rx="8" fill="url(#paint0_linear_2685_169018)"/>+<rect x="1.49414" y="0.824219" width="58.3802" height="54.7812" rx="8.5" stroke="url(#paint1_linear_2685_169018)" stroke-opacity="0.7"/>+<path d="M40.9625 15.9805H21.4023V18.4255L28.5051 23.7556C24.0185 25.2349 21.5735 30.076 23.0527 34.5626C24.532 39.0492 29.3487 41.4942 33.8597 40.015C38.3463 38.5358 40.7913 33.7069 39.3121 29.208C38.4564 26.6285 36.4392 24.5992 33.8597 23.7556L40.9625 18.4255V15.9805ZM34.7766 37.3744L31.1824 35.2717L27.5882 37.3744L28.5418 33.3034L25.3755 30.565L29.5443 30.2105L31.1824 26.3718L32.8206 30.2105L36.9893 30.565L33.823 33.3034L34.7766 37.3744Z" fill="url(#paint2_linear_2685_169018)"/>+<defs>+<linearGradient id="paint0_linear_2685_169018" x1="30.6842" y1="1.32422" x2="24.3534" y2="31.2369" gradientUnits="userSpaceOnUse">+<stop stop-color="#8688A5"/>+<stop offset="1" stop-color="#8688A5" stop-opacity="0"/>+</linearGradient>+<linearGradient id="paint1_linear_2685_169018" x1="30.6842" y1="1.32422" x2="24.9578" y2="36.6757" gradientUnits="userSpaceOnUse">+<stop stop-color="white"/>+<stop offset="1" stop-color="white" stop-opacity="0"/>+</linearGradient>+<linearGradient id="paint2_linear_2685_169018" x1="31.1824" y1="15.9805" x2="31.1824" y2="40.4468" gradientUnits="userSpaceOnUse">+<stop stop-color="white"/>+<stop offset="1" stop-color="white" stop-opacity="0"/>+</linearGradient>+</defs>+</svg>diff --git a/apps/www/public/images/launchweek/8/stars.svg b/apps/www/public/images/launchweek/8/stars.svgnew file mode 100644index 00000000000..0f077672b56--- /dev/null+++ b/apps/www/public/images/launchweek/8/stars.svg@@ -0,0 +1,35 @@+<svg width="1680" height="730" viewBox="0 0 1680 730" fill="none" xmlns="http://www.w3.org/2000/svg">+<circle cx="0.6" cy="0.6" r="0.6" transform="matrix(0.873077 0.487583 -0.78755 0.61625 429.154 175.316)" fill="white"/>+<circle cx="0.6" cy="0.6" r="0.6" transform="matrix(0.994947 -0.100399 0.322552 0.946552 263.797 71.2188)" fill="white"/>+<circle cx="0.6" cy="0.6" r="0.6" transform="matrix(0.994947 -0.100399 0.322552 0.946552 440 282.121)" fill="white"/>+<circle cx="0.6" cy="0.6" r="0.6" transform="matrix(0.994947 -0.100399 0.322552 0.946552 410.404 338.926)" fill="white"/>+<circle cx="0.6" cy="0.6" r="0.6" transform="matrix(0.994947 -0.100399 0.322552 0.946552 576 145.121)" fill="white"/>+<circle cx="0.6" cy="0.6" r="0.6" transform="matrix(0.061383 -0.998114 0.99741 0.07192 961.715 604.32)" fill="white"/>+<circle cx="0.6" cy="0.6" r="0.6" transform="matrix(0.322553 0.946552 -0.994947 0.100399 544.891 280.938)" fill="white"/>+<circle cx="0.6" cy="0.6" r="0.6" transform="matrix(0.322553 0.946552 -0.994947 0.100399 1245.01 314.668)" fill="white"/>+<circle cx="0.6" cy="0.6" r="0.6" transform="matrix(0.322553 0.946552 -0.994947 0.100399 989.111 172.809)" fill="white"/>+<circle cx="0.6" cy="0.6" r="0.6" transform="matrix(0.322553 0.946552 -0.994947 0.100399 974.557 162.211)" fill="white"/>+<circle cx="0.6" cy="0.6" r="0.6" transform="matrix(0.322553 0.946552 -0.994947 0.100399 861.078 260.352)" fill="white"/>+<circle cx="0.6" cy="0.6" r="0.6" transform="matrix(-0.322553 -0.946552 0.994947 -0.100399 814.387 514.258)" fill="white"/>+<circle cx="0.6" cy="0.6" r="0.6" transform="matrix(-0.322553 -0.946552 0.994947 -0.100399 995.66 552.828)" fill="white"/>+<circle cx="0.6" cy="0.6" r="0.6" transform="matrix(-0.322553 -0.946552 0.994947 -0.100399 1154.39 545.258)" fill="white"/>+<ellipse cx="0.6" cy="0.6" rx="0.6" ry="0.6" transform="matrix(-0.95101 -0.309159 0.561017 -0.827804 280.908 307.363)" fill="white"/>+<ellipse cx="0.6" cy="0.6" rx="0.6" ry="0.6" transform="matrix(-0.95101 -0.309159 0.561017 -0.827804 601.275 539.539)" fill="white"/>+<ellipse cx="0.6" cy="0.6" rx="0.6" ry="0.6" transform="matrix(-0.95101 -0.309159 0.561017 -0.827804 250.141 326.566)" fill="white"/>+<ellipse cx="0.6" cy="0.6" rx="0.6" ry="0.6" transform="matrix(-0.95101 -0.309159 0.561017 -0.827804 1553.78 554.305)" fill="white"/>+<ellipse cx="0.6" cy="0.6" rx="0.6" ry="0.6" transform="matrix(-0.95101 -0.309159 0.561017 -0.827804 322.141 513.363)" fill="white"/>+<ellipse cx="0.6" cy="0.6" rx="0.6" ry="0.6" transform="matrix(-0.95101 -0.309159 0.561017 -0.827804 1504.14 366.363)" fill="white"/>+<ellipse cx="0.6" cy="0.6" rx="0.6" ry="0.6" transform="matrix(-0.95101 -0.309159 0.561017 -0.827804 1140.55 485.527)" fill="white"/>+<ellipse cx="0.6" cy="0.6" rx="0.6" ry="0.6" transform="matrix(-0.95101 -0.309159 0.561017 -0.827804 108.141 433.363)" fill="white"/>+<ellipse cx="0.6" cy="0.6" rx="0.6" ry="0.6" transform="matrix(-0.95101 -0.309159 0.561017 -0.827804 1285.14 263.363)" fill="white"/>+<ellipse cx="0.6" cy="0.6" rx="0.6" ry="0.6" transform="matrix(-0.95101 -0.309159 0.561017 -0.827804 1372.09 492.215)" fill="white"/>+<ellipse cx="0.6" cy="0.6" rx="0.6" ry="0.6" transform="matrix(-0.95101 -0.309159 0.561017 -0.827804 630.725 434.363)" fill="white"/>+<ellipse cx="0.6" cy="0.6" rx="0.6" ry="0.6" transform="matrix(-0.95101 -0.309159 0.561017 -0.827804 696.141 281.363)" fill="white"/>+<ellipse cx="0.6" cy="0.6" rx="0.6" ry="0.6" transform="matrix(-0.95101 -0.309159 0.561017 -0.827804 1343.31 263.105)" fill="white"/>+<ellipse cx="0.6" cy="0.6" rx="0.6" ry="0.6" transform="matrix(-0.95101 -0.309159 0.561017 -0.827804 320.141 360.363)" fill="white"/>+<ellipse cx="0.6" cy="0.6" rx="0.6" ry="0.6" transform="matrix(-0.95101 -0.309159 0.561017 -0.827804 1086.54 295.914)" fill="white"/>+<circle cx="0.6" cy="0.6" r="0.6" transform="matrix(-0.958827 0.28399 -0.613701 -0.789538 1308.95 468.746)" fill="white"/>+<circle cx="0.6" cy="0.6" r="0.6" transform="matrix(-0.958827 0.28399 -0.613701 -0.789538 1327.66 447.223)" fill="white"/>+<circle cx="0.6" cy="0.6" r="0.6" transform="matrix(-0.958827 0.28399 -0.613701 -0.789538 1469.98 192.406)" fill="white"/>+<circle cx="0.6" cy="0.6" r="0.6" transform="matrix(-0.958827 0.28399 -0.613701 -0.789538 586.887 448.488)" fill="white"/>+</svg>diff --git a/apps/www/public/images/launchweek/8/swag-bg.png b/apps/www/public/images/launchweek/8/swag-bg.pngnew file mode 100644index 00000000000..667a6b4479cBinary files /dev/null and b/apps/www/public/images/launchweek/8/swag-bg.png differdiff --git a/apps/www/public/images/launchweek/8/swag-illustration.png b/apps/www/public/images/launchweek/8/swag-illustration.pngnew file mode 100644index 00000000000..ad00d5c2adaBinary files /dev/null and b/apps/www/public/images/launchweek/8/swag-illustration.png differdiff --git a/apps/www/public/images/launchweek/8/swag/cap.jpg b/apps/www/public/images/launchweek/8/swag/cap.jpgnew file mode 100644index 00000000000..81016d0a64bBinary files /dev/null and b/apps/www/public/images/launchweek/8/swag/cap.jpg differdiff --git a/apps/www/public/images/launchweek/8/swag/deskmat-lg.jpg b/apps/www/public/images/launchweek/8/swag/deskmat-lg.jpgnew file mode 100644index 00000000000..d6e7819d404Binary files /dev/null and b/apps/www/public/images/launchweek/8/swag/deskmat-lg.jpg differdiff --git a/apps/www/public/images/launchweek/8/swag/deskmat.jpg b/apps/www/public/images/launchweek/8/swag/deskmat.jpgnew file mode 100644index 00000000000..e0666bb9c57Binary files /dev/null and b/apps/www/public/images/launchweek/8/swag/deskmat.jpg differdiff --git a/apps/www/public/images/launchweek/8/swag/shirt.jpg b/apps/www/public/images/launchweek/8/swag/shirt.jpgnew file mode 100644index 00000000000..e6c1cbba65aBinary files /dev/null and b/apps/www/public/images/launchweek/8/swag/shirt.jpg differdiff --git a/apps/www/public/images/launchweek/8/swag/stickers.jpg b/apps/www/public/images/launchweek/8/swag/stickers.jpgnew file mode 100644index 00000000000..74882b4c2e2Binary files /dev/null and b/apps/www/public/images/launchweek/8/swag/stickers.jpg differdiff --git a/apps/www/public/images/launchweek/8/ticket-bg/golden.png b/apps/www/public/images/launchweek/8/ticket-bg/golden.pngnew file mode 100644index 00000000000..cfd151ca8b8Binary files /dev/null and b/apps/www/public/images/launchweek/8/ticket-bg/golden.png differdiff --git a/apps/www/public/images/launchweek/8/ticket-bg/regular.png b/apps/www/public/images/launchweek/8/ticket-bg/regular.pngnew file mode 100644index 00000000000..45bc0cac006Binary files /dev/null and b/apps/www/public/images/launchweek/8/ticket-bg/regular.png differdiff --git a/apps/www/styles/index.css b/apps/www/styles/index.cssindex 2b755d95c61..e0843c3b687 100644--- a/apps/www/styles/index.css+++ b/apps/www/styles/index.css@@ -177,9 +177,6 @@ h6:not(.overwrite) {.section-container {position: relative;- /* z-index: 1; */- /* display: flex;- justify-content: center; */}/* Database page */@@ -188,10 +185,6 @@ h6:not(.overwrite) {@apply border border-gray-50 dark:border-gray-700;}-/* a {- @apply hover:text-black dark:hover:text-white;-} */-.sbui-tabs--alt div[role='tablist'] .sbui-btn-primary {@apply dark:bg-scale-300 bg-gray-800 text-white dark:text-white;text-shadow: none;@@ -213,20 +206,6 @@ h6:not(.overwrite) {/* Auth page */-/* .auth-container > div:nth-child(2) {- width: 420px;-} */--/* .auth-container {- @apply rounded;- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23edebf0' fill-opacity='0.4'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9zm-1 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3Cpath d='M6 5V0H5v5H0v1h5v94h1V6h94V5H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");-}--.dark .auth-container {- background-color: #181818;- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23313131' fill-opacity='0.4'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9zm-1 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3Cpath d='M6 5V0H5v5H0v1h5v94h1V6h94V5H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");-} */-.dark .header--light {display: none;}@@ -303,6 +282,47 @@ table {-webkit-box-orient: vertical;}+/**+animations+*/++.fade-in-up-2ms {+ opacity: 0;+ transform: translate3d(0, 10px, 0);+ animation: fadeInUp 0.2s cubic-bezier(0.25, 0.25, 0, 1) both;+}++.fade-in-up-4ms {+ opacity: 0;+ transform: translate3d(0, 10px, 0);+ animation: fadeInUp 0.4s cubic-bezier(0.25, 0.25, 0, 1) both;+}++.fade-in-2ms {+ opacity: 0;+ transform: translate3d(0, 10px, 0);+ animation: fadeIn 0.2s cubic-bezier(0.25, 0.25, 0, 1) both;+}++.fade-in-4ms {+ opacity: 0;+ transform: translate3d(0, 10px, 0);+ animation: fadeIn 0.4s cubic-bezier(0.25, 0.25, 0, 1) both;+}++@keyframes fadeInUp {+ to {+ opacity: 1;+ transform: translate3d(0, 0, 0);+ }+}++@keyframes fadeIn {+ to {+ opacity: 1;+ }+}+/**launch week*/@@ -491,13 +511,6 @@ launch weekleft: 0;right: 0;overflow: hidden;- /* background: radial-gradient(- circle at 50% -150%,- #39617d 0%,- #00ded1 30%,- #121212 80%,- #121212 100%- ); */}@media screen and (max-width: 769px) {.gradient-container {@@ -524,32 +537,10 @@ launch week);}-.light .gradient-mask {- background: radial-gradient(- circle at 50% -35%,- rgba(57, 97, 125, 0.32) 0%,- rgba(57, 97, 125, 0.32) 5%,- rgb(113 191 187 / 75%) 8%,- #ffffff 65%,- #ffffff 100%- );-}-@media screen and (max-width: 769px) {.gradient-mask {width: 100%;}-- .light .gradient-mask {- background: radial-gradient(- circle at 50% -35%,- rgba(57, 97, 125, 0.32) 0%,- rgba(57, 97, 125, 0.32) 5%,- rgb(155 246 241 / 75%) 8%,- #90cebd 65%,- #67eae8 100%- );- }}/* The bottom part below the stroke */@@ -564,18 +555,10 @@ launch weekbackground: radial-gradient(circle at 50% -60%, rgba(255, 255, 255, 0) 0%, #121212 65%);}-.light .gradient-mask--masked {- background: radial-gradient(circle at 50% -60%, rgba(255, 255, 255, 0) 0%, #fff 65%);-}-@media screen and (max-width: 769px) {.gradient-mask--masked {background: radial-gradient(circle at 50% -40%, rgba(255, 255, 255, 0) 0%, #121212 65%);}-- .light .gradient-mask--masked {- background: radial-gradient(circle at 50% -40%, rgba(255, 255, 255, 0) 0%, #fff 65%);- }}/* The stroke on the circle */@@ -590,10 +573,6 @@ launch weekclip-path: ellipse(52% 213px at 50% -75px);}-.light .flair-mask-a {- background-color: #d7d7d7;-}-/* The inside of the circle */.flair-mask-b {position: absolute;@@ -607,10 +586,6 @@ launch weekclip-path: ellipse(52% 213px at 50% -75px);}-.light .flair-mask-b {- background-color: #fff;-}-@media only screen and (min-width: 600px) {.flair-mask-a {top: 1px;@@ -645,15 +620,6 @@ launch week}}-/* @media only screen and (min-width: 1024px) {- .flair-mask-a {- width: 69.5%;- }- .flair-mask-b {- width: 70%;- }-} */-.orbit {width: 192px;height: 192px;@@ -698,23 +664,6 @@ launch week}.radial-mask {- /* -webkit-mask-image: conic-gradient(- from 0deg at 45% 47%,- #ffffffff 0%,- #000000ff 25%,- #000000ff 50%,- #000000ff 75%,- #ffffffff 100%- );- mask-image: conic-gradient(- from 0deg at 45% 47%,- #ffffffff 0%,- #000000ff 25%,- #000000ff 50%,- #000000ff 75%,- #ffffffff 100%- ); */--webkit-mask-image: linear-gradient(rgba(0, 0, 0, 1), transparent);}@@ -789,3 +738,14 @@ launch week.swiper-transition-linear .swiper-wrapper {transition-timing-function: linear;}++/* .lw8-particle-handle {+ @apply text-xs bg-black flex items-center justify-center rounded-full py-1 px-2 [&>div]:!relative;+} */++/* dat.GUI */++.dg.ac {+ z-index: 9999 !important;+ margin-top: 65px !important;+}diff --git a/apps/www/supabase/functions/lw8-ticket-og/handler.tsx b/apps/www/supabase/functions/lw8-ticket-og/handler.tsxnew file mode 100644index 00000000000..4794d65b5d7--- /dev/null+++ b/apps/www/supabase/functions/lw8-ticket-og/handler.tsx@@ -0,0 +1,139 @@+import React from 'https://esm.sh/[email protected]?deno-std=0.140.0'+import { ImageResponse } from 'https://deno.land/x/[email protected]/mod.ts'+import { createClient } from 'https://esm.sh/@supabase/[email protected]'+import { corsHeaders } from '../_shared/cors.ts'++const STORAGE_URL = 'https://obuldanrptloktxcffvn.supabase.co/storage/v1/object/public/images/lw8'++const BUCKET_FOLDER_VERSION = 'v1'++export async function handler(req: Request) {+ try {+ if (req.method !== 'POST') throw new Error('method not supported')+ const {+ username = 'thorwebdev',+ golden = false,+ }: {+ username?: string+ golden?: boolean+ } = await req.json()++ // Else, generate image and upload to storage.+ const timestamp = encodeURI(new Date().toISOString())+ const ticketImg = `${STORAGE_URL}/tickets/${+ golden ? 'golden' : 'regular'+ }/${BUCKET_FOLDER_VERSION}/${username}.png?t=${timestamp}`++ const bgImg = `${STORAGE_URL}/assets/backgrounds/og-${golden ? 'golden' : 'regular'}.png`+ const ticketWidth = 1100+ const ticketHeight = ticketWidth / 2+ const boxOffset = 24+ const boxWidth = `${ticketWidth + boxOffset}px`+ const boxHeight = `${ticketHeight + boxOffset}px`+ const leftOffset = `${(1200 - ticketWidth) / 2 - boxOffset / 2}px`+ const topOffset = `${(628 - ticketHeight) / 2 - boxOffset / 2}px`++ const geneartedOGImage = new ImageResponse(+ (+ <div+ style={{+ width: '1200px',+ height: '628px',+ position: 'relative',+ backgroundColor: '#141414',+ color: '#F8F9FA',+ overflow: 'hidden',+ display: 'flex',+ flexDirection: 'column',+ padding: '60px',+ alignItems: 'center',+ justifyContent: 'center',+ }}+ >+ {/* Background */}+ <img+ width="1200"+ height="628"+ src={bgImg}+ style={{+ position: 'absolute',+ top: '-1px',+ bottom: '-1px',+ left: '-1px',+ right: '-1px',+ zIndex: '-999',+ }}+ />+ {/* Ticket Box */}+ <div+ style={{+ width: boxWidth,+ height: boxHeight,+ position: 'absolute',+ top: topOffset,+ left: leftOffset,+ zIndex: '-1',+ margin: 'auto',+ borderRadius: '36px',+ background: golden ? 'rgba(3, 3, 3, 0.13)' : 'rgba(5, 9, 14, 0.10)',+ boxShadow: golden+ ? 'inset 0.25px 0.3px 0px 0.3px rgba(253, 234, 137, 0.4), 0px 0px 11px 0px #FDEA89'+ : 'inset 0.25px 0.3px 0px 0.3px rgba(255, 255, 255, 0.4), 0px 0px 11px 0px #440E77',+ }}+ />+ {/* Ticket */}+ <img+ width={ticketWidth}+ height={ticketHeight}+ src={ticketImg}+ style={{+ borderRadius: '26px',+ boxShadow:+ '0px 1px 27px rgba(158, 68, 239, 0.06), 0 80px 40#222022cc 21, 0.8), inset 0 0.2px 1px 0.2px rgba(214, 210, 210, 0.4), inset 0.4px 0.4px 1px 0.3px rgba(210, 231, 229, 0.2)',+ }}+ />+ </div>+ ),+ {+ width: 1200,+ height: 628,+ headers: {+ 'content-type': 'image/png',+ 'cache-control': 'public, max-age=31536000, s-maxage=31536000, no-transform, immutable',+ 'cdn-cache-control': 'max-age=31536000',+ },+ }+ )++ // Upload image to storage.+ const supabaseAdminClient = createClient(+ // Supabase API URL - env var exported by default when deployed.+ Deno.env.get('SUPABASE_URL') ?? '',+ // Supabase API SERVICE ROLE KEY - env var exported by default when deployed.+ Deno.env.get('SUPABASE_SERVICE_ROLE_KEY') ?? ''+ )+ const { error: storageError } = await supabaseAdminClient.storage+ .from('images')+ .upload(+ `lw8/og/${golden ? 'golden' : 'regular'}/${BUCKET_FOLDER_VERSION}/${username}.png`,+ geneartedOGImage.body!,+ {+ contentType: 'image/png',+ cacheControl: '0',+ upsert: true,+ }+ )+ if (storageError) throw new Error(`storageError: ${storageError.message}`)+ // return geneartedOGImage++ return new Response(JSON.stringify({ success: true }), {+ headers: { ...corsHeaders, 'Content-Type': 'application/json' },+ status: 200,+ })+ } catch (error) {+ return new Response(JSON.stringify({ error: error.message }), {+ headers: { ...corsHeaders, 'Content-Type': 'application/json' },+ status: 400,+ })+ }+}diff --git a/apps/www/supabase/functions/lw8-ticket-og/index.ts b/apps/www/supabase/functions/lw8-ticket-og/index.tsnew file mode 100644index 00000000000..26986700825--- /dev/null+++ b/apps/www/supabase/functions/lw8-ticket-og/index.ts@@ -0,0 +1,11 @@+// Follow this setup guide to integrate the Deno language server with your editor:+// https://deno.land/manual/getting_started/setup_your_environment+// This enables autocomplete, go to definition, etc.++import { serve } from 'https://deno.land/[email protected]/http/server.ts'++import { handler } from './handler.tsx'++console.log(`Function "lw8-ticket-og" up and running`)++serve(handler)diff --git a/apps/www/supabase/functions/lw8-ticket/README.md b/apps/www/supabase/functions/lw8-ticket/README.mdnew file mode 100644index 00000000000..9c5b3d4e49e--- /dev/null+++ b/apps/www/supabase/functions/lw8-ticket/README.md@@ -0,0 +1,21 @@+# Open Graph (OG) Image Generation with Supabase Storage CDN Caching++Generate Open Graph images with Deno and Supabase Edge Functions and cache the generated image with Supabase Storage CDN.++- Docs: https://deno.land/x/[email protected]+- Examples: https://vercel.com/docs/concepts/functions/edge-functions/og-image-examples+- Demo: https://obuldanrptloktxcffvn.functions.supabase.co/lw8-ticket?username=thorwebdev++## Run locally++```bash+supabase functions serve lw8-ticket --no-verify-jwt+```++Navigate to http://localhost:54321/functions/v1/lw8-ticket?username=thorwebdev++## Deploy++```bash+supabase functions deploy lw8-ticket --no-verify-jwt+```diff --git a/apps/www/supabase/functions/lw8-ticket/handler.tsx b/apps/www/supabase/functions/lw8-ticket/handler.tsxnew file mode 100644index 00000000000..cda66443332--- /dev/null+++ b/apps/www/supabase/functions/lw8-ticket/handler.tsx@@ -0,0 +1,279 @@+import React from 'https://esm.sh/[email protected]?deno-std=0.140.0'+import { ImageResponse } from 'https://deno.land/x/[email protected]/mod.ts'+import { createClient } from 'https://esm.sh/@supabase/[email protected]'+import { corsHeaders } from '../_shared/cors.ts'++const STORAGE_URL = 'https://obuldanrptloktxcffvn.supabase.co/storage/v1/object/public/images/lw8'++// Load custom font+const FONT_URL = `${STORAGE_URL}/font/CircularStd-Book.otf`+const MONO_FONT_URL = `${STORAGE_URL}/font/SourceCodePro-Regular.ttf?t=2023-07-18T13%3A03%3A29.474Z`+const font = fetch(new URL(FONT_URL, import.meta.url)).then((res) => res.arrayBuffer())+const mono_font = fetch(new URL(MONO_FONT_URL, import.meta.url)).then((res) => res.arrayBuffer())+const BUCKET_FOLDER_VERSION = 'v1'++const LW_TABLE = 'lw8_tickets_golden'++export async function handler(req: Request) {+ const url = new URL(req.url)+ const username = url.searchParams.get('username') ?? url.searchParams.get('amp;username')+ const assumeGolden = url.searchParams.get('golden') ?? url.searchParams.get('amp;golden')+ const userAgent = req.headers.get('user-agent')++ try {+ if (!username) throw new Error('missing username param')++ const supabaseAdminClient = createClient(+ // Supabase API URL - env var exported by default when deployed.+ Deno.env.get('SUPABASE_URL') ?? '',+ // Supabase API SERVICE ROLE KEY - env var exported by default when deployed.+ Deno.env.get('SUPABASE_SERVICE_ROLE_KEY') ?? ''+ )++ // Track social shares+ if (userAgent?.toLocaleLowerCase().includes('twitter')) {+ await supabaseAdminClient+ .from(LW_TABLE)+ .update({ sharedOnTwitter: 'now' })+ .eq('username', username)+ .is('sharedOnTwitter', null)+ } else if (userAgent?.toLocaleLowerCase().includes('linkedin')) {+ await supabaseAdminClient+ .from(LW_TABLE)+ .update({ sharedOnLinkedIn: 'now' })+ .eq('username', username)+ .is('sharedOnLinkedIn', null)+ }++ // Get ticket data+ const { data, error } = await supabaseAdminClient+ .from(LW_TABLE)+ .select('name, ticketNumber, sharedOnTwitter, sharedOnLinkedIn, metadata')+ .eq('username', username)+ .maybeSingle()++ if (error) console.log(error.message)+ if (!data) throw new Error(error?.message ?? 'user not found')+ const { name, ticketNumber, metadata } = data++ const golden = (!!data?.sharedOnTwitter && !!data?.sharedOnLinkedIn) ?? false+ if (assumeGolden && !golden) return await fetch(`${STORAGE_URL}/golden_no_meme.png`)++ // Else, generate image and upload to storage.+ const BACKGROUND = {+ REG: {+ BG: `${STORAGE_URL}/assets/backgrounds/regular.png`,+ LOGO: `${STORAGE_URL}/assets/lw8-logo-regular.png`,+ },+ GOLD: {+ BG: `${STORAGE_URL}/assets/backgrounds/golden.png`,+ LOGO: `${STORAGE_URL}/assets/lw8-logo-gold.png`,+ },+ }++ const fontData = await font+ const monoFontData = await mono_font+ const numDigits = `${Number(ticketNumber)}`.length+ const prefix = `00000000`.slice(numDigits)+ const HAS_ROLE = !!metadata?.role+ const HAS_COMPANY = !!metadata?.company+ const HAS_LOCATION = !!metadata?.location+ const HAS_NO_META = !HAS_ROLE && !HAS_COMPANY && !HAS_LOCATION++ const generatedTicketImage = new ImageResponse(+ (+ <>+ <div+ style={{+ width: '1200px',+ height: '628px',+ position: 'relative',+ backgroundColor: '#000',+ color: '#F8F9FA',+ fontFamily: '"Circular"',+ overflow: 'hidden',+ display: 'flex',+ flexDirection: 'column',+ padding: '60px',+ justifyContent: 'space-between',+ }}+ >+ {/* Background */}+ <img+ width="1202"+ height="632"+ style={{+ position: 'absolute',+ top: '-1px',+ left: '-1px',+ bottom: '-1px',+ right: '-1px',+ zIndex: '-9000',+ }}+ src={golden ? BACKGROUND['GOLD']['BG'] : BACKGROUND['REG']['BG']}+ />+ <div style={{ display: 'flex' }}>+ <img+ src={golden ? BACKGROUND['GOLD']['LOGO'] : BACKGROUND['REG']['LOGO']}+ width={250}+ height={55}+ />+ </div>++ {/* Name & username */}+ <div+ style={{+ display: 'flex',+ alignItems: 'flex-start',+ justifyContent: 'center',+ flexDirection: 'column',+ position: 'absolute',+ top: '114',+ left: '60',+ width: '727',+ height: '400',+ overflow: 'hidden',+ textOverflow: 'clip',+ textAlign: 'left',+ }}+ >+ <div+ style={{+ display: 'flex',+ color: 'transparent',+ backgroundImage:+ 'linear-gradient(90deg, rgba(248, 249, 250, 0.66) -31.69%, #F8F9FA 22.14%, rgba(248, 249, 250, 0.5) 122.78%)',+ backgroundClip: 'text',+ marginBottom: '10px',+ }}+ >+ <p+ style={{+ margin: '0',+ padding: '10px 0',+ fontSize: '72px',+ lineHeight: '105%',+ }}+ >+ {name ?? username}+ </p>+ </div>++ {/* Username */}+ <div+ style={{+ color: '#EDEDED',+ opacity: 0.8,+ display: 'flex',+ fontSize: '30',+ margin: '0',+ }}+ >+ {HAS_NO_META && username && `@${username}`}+ {HAS_ROLE && `${metadata.role}`}+ {HAS_COMPANY && `${HAS_ROLE ? ' at ' : ''}${metadata.company} `}+ {HAS_LOCATION && `${(HAS_ROLE || HAS_COMPANY) && ' —'} ${metadata.location}`}+ </div>+ </div>+ <p+ style={{+ fontFamily: '"SourceCodePro"',+ fontSize: '21',+ textTransform: 'uppercase',+ letterSpacing: '0.15rem',+ }}+ >+ <span>August 7-11</span>+ <span style={{ marginLeft: '70px' }}>supabase.com/launch-week</span>+ </p>+ </div>+ {/* Ticket No */}+ <p+ style={{+ color: '#F8F9FA',+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ position: 'absolute',+ bottom: '310',+ right: '-240',+ margin: 'auto 0',+ textAlign: 'center',+ width: '628',+ height: '28',+ transform: 'rotate(-90deg)',+ opacity: 0.8,+ fontFamily: '"SourceCodePro"',+ fontSize: '35',+ letterSpacing: '1.5rem',+ }}+ >+ {`NO ${prefix}${ticketNumber}`}+ </p>+ </>+ ),+ {+ width: 1200,+ height: 628,+ fonts: [+ {+ name: 'Circular',+ data: fontData,+ style: 'normal',+ },+ {+ name: 'SourceCodePro',+ data: monoFontData,+ style: 'normal',+ },+ ],+ headers: {+ 'content-type': 'image/png',+ 'cache-control': 'public, max-age=31536000, s-maxage=31536000, no-transform, immutable',+ 'cdn-cache-control': 'max-age=31536000',+ },+ }+ )++ // Upload image to storage.+ const { error: storageError } = await supabaseAdminClient.storage+ .from('images')+ .upload(+ `lw8/tickets/${golden ? 'golden' : 'regular'}/${BUCKET_FOLDER_VERSION}/${username}.png`,+ generatedTicketImage.body!,+ {+ contentType: 'image/png',+ // cacheControl: `${60 * 60 * 24 * 7}`,+ cacheControl: `0`,+ // Update cached og image, people might need to update info+ upsert: true,+ }+ )+ if (storageError) throw new Error(`storageError: ${storageError.message}`)++ // Generate og image+ fetch('https://obuldanrptloktxcffvn.functions.supabase.co/lw8-ticket-og', {+ method: 'POST',+ headers: {+ 'Content-Type': 'application/json',+ Authorization:+ 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im9idWxkYW5ycHRsb2t0eGNmZnZuIiwicm9sZSI6ImFub24iLCJpYXQiOjE2Njk3MjcwMTIsImV4cCI6MTk4NTMwMzAxMn0.SZLqryz_-stF8dgzeVXmzZWPOqdOrBwqJROlFES8v3I',+ },+ body: JSON.stringify({+ username,+ golden,+ }),+ })++ return await fetch(+ `${STORAGE_URL}/tickets/${+ golden ? 'golden' : 'regular'+ }/${BUCKET_FOLDER_VERSION}/${username}.png`+ )+ } catch (error) {+ return new Response(JSON.stringify({ error: error.message }), {+ headers: { ...corsHeaders, 'Content-Type': 'application/json' },+ status: 400,+ })+ }+}diff --git a/apps/www/supabase/functions/lw8-ticket/index.ts b/apps/www/supabase/functions/lw8-ticket/index.tsnew file mode 100644index 00000000000..84d78bdf295--- /dev/null+++ b/apps/www/supabase/functions/lw8-ticket/index.ts@@ -0,0 +1,11 @@+// Follow this setup guide to integrate the Deno language server with your editor:+// https://deno.land/manual/getting_started/setup_your_environment+// This enables autocomplete, go to definition, etc.++import { serve } from 'https://deno.land/[email protected]/http/server.ts'++import { handler } from './handler.tsx'++console.log(`Function "lw8-ticket" up and running`)++serve(handler)diff --git a/apps/www/tailwind.config.js b/apps/www/tailwind.config.jsindex 66c96328173..32b2dbac46c 100644--- a/apps/www/tailwind.config.js+++ b/apps/www/tailwind.config.js@@ -17,10 +17,23 @@ module.exports = config({'0%': { backgroundColor: 'rgba(63, 207, 142, 0.1)' },'100%': { backgroundColor: 'transparent' },},+ fadeIn: {+ '0%, 100%': { opacity: '1' },+ },+ slideIn: {+ '0%, 100%': { transform: 'translate3d(0,0,0)' },+ },+ slideIn: {+ '0%, 100%': { transform: 'translate3d(0,0,0)' },+ },+ spin: {+ '0%, 100%': { transform: 'rotate(360deg)' },+ },},animation: {'flash-code': 'flash-code 1s forwards','flash-code-slow': 'flash-code 2s forwards',+ spin: 'spin 1s both infinite',},},},diff --git a/package-lock.json b/package-lock.jsonindex 084b2d064df..a44f1c24ac3 100644--- a/package-lock.json+++ b/package-lock.json@@ -311,12 +311,15 @@"@mdx-js/react": "^2.1.5","@next/bundle-analyzer": "^13.4.0","@next/mdx": "^12.3.2",+ "@react-three/drei": "^8.20.2",+ "@react-three/fiber": "^7.0.29","@supabase/auth-ui-react": "^0.1.6","@supabase/supabase-js": "^2.23.0","classnames": "^2.3.1","cobe": "^0.6.2","common": "*","config": "*",+ "dat.gui": "^0.7.9","date-fns": "2.10.0","dayjs": "^1.11.7","framer-motion": "^6.5.1",@@ -334,6 +337,7 @@"parse-numeric-range": "^1.3.0","react": "^17.0.2","react-copy-to-clipboard": "^5.1.0",+ "react-countdown": "^2.3.5","react-dom": "^17.0.2","react-ga": "^3.3.0","react-markdown": "^8.0.3",@@ -349,6 +353,7 @@"shared-data": "*","swiper": "^6.5.0","swr": "^0.5.4",+ "three": "^0.154.0","typescript": "^5.0.4","ui": "*","use-debounce": "^7.0.1",@@ -359,6 +364,7 @@"devDependencies": {"@tailwindcss/typography": "^0.5.9","@types/classnames": "^2.3.1",+ "@types/dat.gui": "^0.7.10","@types/jest": "^27.4.0","@types/mdx-js__react": "^1.5.5","@types/node": "^17.0.24",@@ -368,6 +374,7 @@"@types/react-copy-to-clipboard": "^5.0.4","@types/react-dom": "^17.0.11","@types/react-syntax-highlighter": "^15.5.6",+ "@types/three": "^0.154.0","autoprefixer": "^10.4.14","config": "*","file-loader": "^6.2.0",@@ -2674,6 +2681,35 @@"version": "6.0.2","license": "MIT"},+ "node_modules/@chevrotain/cst-dts-gen": {+ "version": "10.5.0",+ "resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-10.5.0.tgz",+ "integrity": "sha512-lhmC/FyqQ2o7pGK4Om+hzuDrm9rhFYIJ/AXoQBeongmn870Xeb0L6oGEiuR8nohFNL5sMaQEJWCxr1oIVIVXrw==",+ "dependencies": {+ "@chevrotain/gast": "10.5.0",+ "@chevrotain/types": "10.5.0",+ "lodash": "4.17.21"+ }+ },+ "node_modules/@chevrotain/gast": {+ "version": "10.5.0",+ "resolved": "https://registry.npmjs.org/@chevrotain/gast/-/gast-10.5.0.tgz",+ "integrity": "sha512-pXdMJ9XeDAbgOWKuD1Fldz4ieCs6+nLNmyVhe2gZVqoO7v8HXuHYs5OV2EzUtbuai37TlOAQHrTDvxMnvMJz3A==",+ "dependencies": {+ "@chevrotain/types": "10.5.0",+ "lodash": "4.17.21"+ }+ },+ "node_modules/@chevrotain/types": {+ "version": "10.5.0",+ "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-10.5.0.tgz",+ "integrity": "sha512-f1MAia0x/pAVPWH/T73BJVyO2XU5tI4/iE7cnxb7tqdNTNhQI3Uq3XkqcoteTmD4t1aM0LbHCJOhgIDn07kl2A=="+ },+ "node_modules/@chevrotain/utils": {+ "version": "10.5.0",+ "resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-10.5.0.tgz",+ "integrity": "sha512-hBzuU5+JjB2cqNZyszkDHZgOSrUUT8V3dhgRl8Q9Gp6dAj/H5+KILGjbhDpc3Iy9qmqlm/akuOI2ut9VUtzJxQ=="+ },"node_modules/@cnakazawa/watch": {"version": "1.0.4","dev": true,@@ -6646,6 +6682,130 @@"version": "2.0.0","license": "MIT"},+ "node_modules/@react-spring/animated": {+ "version": "9.7.3",+ "resolved": "https://registry.npmjs.org/@react-spring/animated/-/animated-9.7.3.tgz",+ "integrity": "sha512-5CWeNJt9pNgyvuSzQH+uy2pvTg8Y4/OisoscZIR8/ZNLIOI+CatFBhGZpDGTF/OzdNFsAoGk3wiUYTwoJ0YIvw==",+ "dependencies": {+ "@react-spring/shared": "~9.7.3",+ "@react-spring/types": "~9.7.3"+ },+ "peerDependencies": {+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0"+ }+ },+ "node_modules/@react-spring/core": {+ "version": "9.7.3",+ "resolved": "https://registry.npmjs.org/@react-spring/core/-/core-9.7.3.tgz",+ "integrity": "sha512-IqFdPVf3ZOC1Cx7+M0cXf4odNLxDC+n7IN3MDcVCTIOSBfqEcBebSv+vlY5AhM0zw05PDbjKrNmBpzv/AqpjnQ==",+ "dependencies": {+ "@react-spring/animated": "~9.7.3",+ "@react-spring/shared": "~9.7.3",+ "@react-spring/types": "~9.7.3"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/react-spring/donate"+ },+ "peerDependencies": {+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0"+ }+ },+ "node_modules/@react-spring/shared": {+ "version": "9.7.3",+ "resolved": "https://registry.npmjs.org/@react-spring/shared/-/shared-9.7.3.tgz",+ "integrity": "sha512-NEopD+9S5xYyQ0pGtioacLhL2luflh6HACSSDUZOwLHoxA5eku1UPuqcJqjwSD6luKjjLfiLOspxo43FUHKKSA==",+ "dependencies": {+ "@react-spring/types": "~9.7.3"+ },+ "peerDependencies": {+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0"+ }+ },+ "node_modules/@react-spring/three": {+ "version": "9.7.3",+ "resolved": "https://registry.npmjs.org/@react-spring/three/-/three-9.7.3.tgz",+ "integrity": "sha512-Q1p512CqUlmMK8UMBF/Rj79qndhOWq4XUTayxMP9S892jiXzWQuj+xC3Xvm59DP/D4JXusXpxxqfgoH+hmOktA==",+ "dependencies": {+ "@react-spring/animated": "~9.7.3",+ "@react-spring/core": "~9.7.3",+ "@react-spring/shared": "~9.7.3",+ "@react-spring/types": "~9.7.3"+ },+ "peerDependencies": {+ "@react-three/fiber": ">=6.0",+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0",+ "three": ">=0.126"+ }+ },+ "node_modules/@react-spring/types": {+ "version": "9.7.3",+ "resolved": "https://registry.npmjs.org/@react-spring/types/-/types-9.7.3.tgz",+ "integrity": "sha512-Kpx/fQ/ZFX31OtlqVEFfgaD1ACzul4NksrvIgYfIFq9JpDHFwQkMVZ10tbo0FU/grje4rcL4EIrjekl3kYwgWw=="+ },+ "node_modules/@react-three/drei": {+ "version": "8.20.2",+ "resolved": "https://registry.npmjs.org/@react-three/drei/-/drei-8.20.2.tgz",+ "integrity": "sha512-V2P/YHYg2+N58eWtIqmOJf0t5nWGTcmpT+ci4tB5gt3CsWU2vuoeQFhvBmqEF+cXwZD5ZYKPfQDf/06NzTx/lw==",+ "dependencies": {+ "@babel/runtime": "^7.11.2",+ "@react-spring/three": "^9.3.1",+ "@use-gesture/react": "^10.2.0",+ "detect-gpu": "^4.0.14",+ "glsl-noise": "^0.0.0",+ "lodash.omit": "^4.5.0",+ "lodash.pick": "^4.4.0",+ "meshline": "^2.0.4",+ "react-composer": "^5.0.2",+ "react-merge-refs": "^1.1.0",+ "stats.js": "^0.17.0",+ "suspend-react": "^0.0.8",+ "three-mesh-bvh": "^0.5.7",+ "three-stdlib": "^2.8.9",+ "troika-three-text": "^0.46.3",+ "utility-types": "^3.10.0",+ "zustand": "^3.5.13"+ },+ "peerDependencies": {+ "@react-three/fiber": ">=6.0",+ "react": ">=17.0",+ "react-dom": ">=17.0",+ "three": ">=0.137"+ },+ "peerDependenciesMeta": {+ "react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@react-three/fiber": {+ "version": "7.0.29",+ "resolved": "https://registry.npmjs.org/@react-three/fiber/-/fiber-7.0.29.tgz",+ "integrity": "sha512-TE+/iaGrjluGsPwN2RkLXxKD4ak+unsh0YKIFKGcuAOW9jYcAyMGKAtgFO8MS7/HNCrZZQQSg23sJ8IPgtdkDg==",+ "dependencies": {+ "@babel/runtime": "^7.13.10",+ "@types/react-reconciler": "^0.26.2",+ "react-merge-refs": "^1.1.0",+ "react-reconciler": "^0.26.2",+ "react-three-fiber": "0.0.0-deprecated",+ "react-use-measure": "^2.1.1",+ "resize-observer-polyfill": "^1.5.1",+ "scheduler": "^0.20.2",+ "use-asset": "^1.0.4",+ "utility-types": "^3.10.0",+ "zustand": "^3.5.1"+ },+ "peerDependencies": {+ "react": ">=17.0",+ "react-dom": ">=17.0",+ "three": ">=0.133"+ },+ "peerDependenciesMeta": {+ "react-dom": {+ "optional": true+ }+ }+ },"node_modules/@rushstack/eslint-patch": {"version": "1.3.0","license": "MIT"@@ -13941,6 +14101,12 @@"devOptional": true,"license": "MIT"},+ "node_modules/@tweenjs/tween.js": {+ "version": "18.6.4",+ "resolved": "https://registry.npmjs.org/@tweenjs/tween.js/-/tween.js-18.6.4.tgz",+ "integrity": "sha512-lB9lMjuqjtuJrx7/kOkqQBtllspPIN+96OvTCeJ2j5FEzinoAXTdAMFnDAQT1KVPRlnYfBrqxtqP66vDM40xxQ==",+ "dev": true+ },"node_modules/@types/acorn": {"version": "4.0.6","license": "MIT",@@ -14084,6 +14250,12 @@"version": "3.0.0","license": "MIT"},+ "node_modules/@types/dat.gui": {+ "version": "0.7.10",+ "resolved": "https://registry.npmjs.org/@types/dat.gui/-/dat.gui-0.7.10.tgz",+ "integrity": "sha512-sLifoNrvs4lgJkAUZcTB28dbWy0AM05Yc0BzTqHheK0tRYRVsJHoFLocB5heDbb5amaFLEXna41GOM6IG06oqA==",+ "dev": true+ },"node_modules/@types/debounce-promise": {"version": "3.1.6","license": "MIT"@@ -14105,6 +14277,11 @@"dev": true,"license": "MIT"},+ "node_modules/@types/draco3d": {+ "version": "1.4.2",+ "resolved": "https://registry.npmjs.org/@types/draco3d/-/draco3d-1.4.2.tgz",+ "integrity": "sha512-goh23EGr6CLV6aKPwN1p8kBD/7tT5V/bLpToSbarKrwVejqNrspVrv8DhliteYkkhZYrlq/fwKZRRUzH4XN88w=="+ },"node_modules/@types/ejs": {"version": "3.1.2","dev": true,@@ -14358,6 +14535,11 @@"dev": true,"license": "MIT"},+ "node_modules/@types/offscreencanvas": {+ "version": "2019.7.0",+ "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.7.0.tgz",+ "integrity": "sha512-PGcyveRIpL1XIqK8eBsmRBt76eFgtzuPiSTyKHZxnGemp2yzGzWpjYKAfK3wIMiU7eH+851yEpiuP8JZerTmWg=="+ },"node_modules/@types/papaparse": {"version": "5.3.7","dev": true,@@ -14468,6 +14650,14 @@"@types/react": "*"}},+ "node_modules/@types/react-reconciler": {+ "version": "0.26.7",+ "resolved": "https://registry.npmjs.org/@types/react-reconciler/-/react-reconciler-0.26.7.tgz",+ "integrity": "sha512-mBDYl8x+oyPX/VBb3E638N0B7xG+SPk/EAMcVPeexqus/5aTpTphQi0curhhshOqRrc9t6OPoJfEUkbymse/lQ==",+ "dependencies": {+ "@types/react": "*"+ }+ },"node_modules/@types/react-redux": {"version": "7.1.25","license": "MIT",@@ -14564,6 +14754,12 @@"dev": true,"license": "MIT"},+ "node_modules/@types/stats.js": {+ "version": "0.17.0",+ "resolved": "https://registry.npmjs.org/@types/stats.js/-/stats.js-0.17.0.tgz",+ "integrity": "sha512-9w+a7bR8PeB0dCT/HBULU2fMqf6BAzvKbxFboYhmDtDkKPiyXYbjoe2auwsXlEFI7CFNMF1dCv3dFH5Poy9R1w==",+ "dev": true+ },"node_modules/@types/strip-ansi": {"version": "5.2.1","dev": true,@@ -14587,6 +14783,20 @@"@types/jest": "*"}},+ "node_modules/@types/three": {+ "version": "0.154.0",+ "resolved": "https://registry.npmjs.org/@types/three/-/three-0.154.0.tgz",+ "integrity": "sha512-IioqpGhch6FdLDh4zazRn3rXHj6Vn2nVOziJdXVbJFi9CaI65LtP9qqUtpzbsHK2Ezlox8NtsLNHSw3AQzucjA==",+ "dev": true,+ "dependencies": {+ "@tweenjs/tween.js": "~18.6.4",+ "@types/stats.js": "*",+ "@types/webxr": "*",+ "fflate": "~0.6.9",+ "lil-gui": "~0.17.0",+ "meshoptimizer": "~0.18.1"+ }+ },"node_modules/@types/uglify-js": {"version": "3.17.1","dev": true,@@ -14665,6 +14875,11 @@"@types/node": "*"}},+ "node_modules/@types/webxr": {+ "version": "0.5.2",+ "resolved": "https://registry.npmjs.org/@types/webxr/-/webxr-0.5.2.tgz",+ "integrity": "sha512-szL74BnIcok9m7QwYtVmQ+EdIKwbjPANudfuvDrAF8Cljg9MKUlIoc1w5tjj9PMpeSH3U1Xnx//czQybJ0EfSw=="+ },"node_modules/@types/yargs": {"version": "15.0.15","dev": true,@@ -14883,6 +15098,22 @@"url": "https://opencollective.com/typescript-eslint"}},+ "node_modules/@use-gesture/core": {+ "version": "10.2.27",+ "resolved": "https://registry.npmjs.org/@use-gesture/core/-/core-10.2.27.tgz",+ "integrity": "sha512-V4XV7hn9GAD2MYu8yBBVi5iuWBsAMfjPRMsEVzoTNGYH72tf0kFP+OKqGKc8YJFQIJx6yj+AOqxmEHOmx2/MEA=="+ },+ "node_modules/@use-gesture/react": {+ "version": "10.2.27",+ "resolved": "https://registry.npmjs.org/@use-gesture/react/-/react-10.2.27.tgz",+ "integrity": "sha512-7E5vnWCxeslWlxwZ8uKIcnUZVMTRMZ8cvSnLLKF1NkyNb3PnNiAzoXM4G1vTKJKRhgOTeI6wK1YsEpwo9ABV5w==",+ "dependencies": {+ "@use-gesture/core": "10.2.27"+ },+ "peerDependencies": {+ "react": ">= 16.8.0"+ }+ },"node_modules/@webassemblyjs/ast": {"version": "1.9.0","license": "MIT",@@ -16418,6 +16649,14 @@"url": "https://github.com/sponsors/sindresorhus"}},+ "node_modules/bidi-js": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.0.2.tgz",+ "integrity": "sha512-rzSy/k7WdX5zOyeHHCOixGXbCHkyogkxPKL2r8QtzHmVQDiWCXUWa18bLdMWT9CYMLOYTjWpTHawuev2ouYJVw==",+ "dependencies": {+ "require-from-string": "^2.0.2"+ }+ },"node_modules/big-integer": {"version": "1.6.51","license": "Unlicense",@@ -17236,6 +17475,19 @@"node": "*"}},+ "node_modules/chevrotain": {+ "version": "10.5.0",+ "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-10.5.0.tgz",+ "integrity": "sha512-Pkv5rBY3+CsHOYfV5g/Vs5JY9WTHHDEKOlohI2XeygaZhUeqhAlldZ8Hz9cRmxu709bvS08YzxHdTPHhffc13A==",+ "dependencies": {+ "@chevrotain/cst-dts-gen": "10.5.0",+ "@chevrotain/gast": "10.5.0",+ "@chevrotain/types": "10.5.0",+ "@chevrotain/utils": "10.5.0",+ "lodash": "4.17.21",+ "regexp-to-ast": "0.5.0"+ }+ },"node_modules/chokidar": {"version": "3.5.3","funding": [@@ -19032,6 +19284,11 @@"version": "1.0.8","license": "BSD-2-Clause"},+ "node_modules/dat.gui": {+ "version": "0.7.9",+ "resolved": "https://registry.npmjs.org/dat.gui/-/dat.gui-0.7.9.tgz",+ "integrity": "sha512-sCNc1OHobc+Erc1HqiswYgHdVNpSJUlk/Hz8vzOCsER7rl+oF/4+v8GXFUyCgtXpoCX6+bnmg07DedLvBLwYKQ=="+ },"node_modules/data-uri-to-buffer": {"version": "4.0.1","dev": true,@@ -19075,6 +19332,11 @@"node": ">=0.11.0"}},+ "node_modules/debounce": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz",+ "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug=="+ },"node_modules/debounce-promise": {"version": "3.1.2","license": "MIT"@@ -19485,6 +19747,14 @@"url": "https://github.com/sponsors/wooorm"}},+ "node_modules/detect-gpu": {+ "version": "4.0.50",+ "resolved": "https://registry.npmjs.org/detect-gpu/-/detect-gpu-4.0.50.tgz",+ "integrity": "sha512-T67HE5+ONONN8rPXCBJPupyCg2QT8+l2NUUMuPxAppsMJBDPG/Jg0URLs6GyDzLm2niUE+oncIHSuy3VinoPeQ==",+ "dependencies": {+ "webgl-constants": "^1.1.1"+ }+ },"node_modules/detect-indent": {"version": "6.1.0","dev": true,@@ -19759,6 +20029,11 @@"dev": true,"license": "BSD-3-Clause"},+ "node_modules/draco3d": {+ "version": "1.5.6",+ "resolved": "https://registry.npmjs.org/draco3d/-/draco3d-1.5.6.tgz",+ "integrity": "sha512-+3NaRjWktb5r61ZFoDejlykPEFKT5N/LkbXsaddlw6xNSXBanUYpFc2AXXpbJDilPHazcSreU/DpQIaxfX0NfQ=="+ },"node_modules/duplexer": {"version": "0.1.2","license": "MIT"@@ -21368,6 +21643,11 @@"dev": true,"license": "MIT"},+ "node_modules/fflate": {+ "version": "0.6.10",+ "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.6.10.tgz",+ "integrity": "sha512-IQrh3lEPM93wVCEczc9SaAOvkmcoQn/G8Bo1e8ZPlY3X3bnAxWaBdvTdvM1hP62iZp0BXWDy4vTAy4fF0+Dlpg=="+ },"node_modules/figgy-pudding": {"version": "3.5.2","license": "ISC"@@ -22224,6 +22504,11 @@"url": "https://github.com/sponsors/sindresorhus"}},+ "node_modules/glsl-noise": {+ "version": "0.0.0",+ "resolved": "https://registry.npmjs.org/glsl-noise/-/glsl-noise-0.0.0.tgz",+ "integrity": "sha512-b/ZCF6amfAUb7dJM/MxRs7AetQEahYzJ8PtgfrmEdtw6uyGOr+ZSGtgjFm6mfsBkxJ4d2W7kg+Nlqzqvn3Bc0w=="+ },"node_modules/goober": {"version": "2.1.13","license": "MIT",@@ -26077,6 +26362,11 @@"node": ">= 8"}},+ "node_modules/ktx-parse": {+ "version": "0.4.5",+ "resolved": "https://registry.npmjs.org/ktx-parse/-/ktx-parse-0.4.5.tgz",+ "integrity": "sha512-MK3FOody4TXbFf8Yqv7EBbySw7aPvEcPX++Ipt6Sox+/YMFvR5xaTyhfNSk1AEmMy+RYIw81ctN4IMxCB8OAlg=="+ },"node_modules/language-subtag-registry": {"version": "0.3.22","license": "CC0-1.0"@@ -26218,6 +26508,12 @@"immediate": "~3.0.5"}},+ "node_modules/lil-gui": {+ "version": "0.17.0",+ "resolved": "https://registry.npmjs.org/lil-gui/-/lil-gui-0.17.0.tgz",+ "integrity": "sha512-MVBHmgY+uEbmJNApAaPbtvNh1RCAeMnKym82SBjtp5rODTYKWtM+MXHCifLe2H2Ti1HuBGBtK/5SyG4ShQ3pUQ==",+ "dev": true+ },"node_modules/lilconfig": {"version": "2.1.0","license": "MIT",@@ -26372,6 +26668,16 @@"version": "4.6.2","license": "MIT"},+ "node_modules/lodash.omit": {+ "version": "4.5.0",+ "resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz",+ "integrity": "sha512-XeqSp49hNGmlkj2EJlfrQFIzQ6lXdNro9sddtQzcJY8QaoC2GO0DT7xaIokHeyM+mIT0mPMlPvkYzg2xCuHdZg=="+ },+ "node_modules/lodash.pick": {+ "version": "4.4.0",+ "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz",+ "integrity": "sha512-hXt6Ul/5yWjfklSGvLQl8vM//l3FtyHZeuelpzK6mm99pNvN9yTDruNZPEJZD1oWrqo+izBmB7oUfWgcCX7s4Q=="+ },"node_modules/lodash.template": {"version": "4.5.0","license": "MIT",@@ -27284,6 +27590,20 @@}}},+ "node_modules/meshline": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/meshline/-/meshline-2.0.4.tgz",+ "integrity": "sha512-Jh6DJl/zLqA4xsKvGv5950jr2ukyXQE1wgxs8u94cImHrvL6soVIggqjP+2hVHZXGYaKnWszhtjuCbKNeQyYiw==",+ "peerDependencies": {+ "three": ">=0.137"+ }+ },+ "node_modules/meshoptimizer": {+ "version": "0.18.1",+ "resolved": "https://registry.npmjs.org/meshoptimizer/-/meshoptimizer-0.18.1.tgz",+ "integrity": "sha512-ZhoIoL7TNV4s5B6+rx5mC//fw8/POGyNxS/DZyCJeiZ12ScLfVwRE/GfsxwiTkMYYD5DmK2/JXnEVXqL4rF+Sw==",+ "dev": true+ },"node_modules/methods": {"version": "1.1.2","dev": true,@@ -28259,6 +28579,11 @@"dev": true,"license": "MIT"},+ "node_modules/mmd-parser": {+ "version": "1.0.4",+ "resolved": "https://registry.npmjs.org/mmd-parser/-/mmd-parser-1.0.4.tgz",+ "integrity": "sha512-Qi0VCU46t2IwfGv5KF0+D/t9cizcDug7qnNoy9Ggk7aucp0tssV8IwTMkBlDbm+VqAf3cdQHTCARKSsuS2MYFg=="+ },"node_modules/mobx": {"version": "6.9.0","license": "MIT",@@ -30295,6 +30620,21 @@"opener": "bin/opener-bin.js"}},+ "node_modules/opentype.js": {+ "version": "1.3.4",+ "resolved": "https://registry.npmjs.org/opentype.js/-/opentype.js-1.3.4.tgz",+ "integrity": "sha512-d2JE9RP/6uagpQAVtJoF0pJJA/fgai89Cc50Yp0EJHk+eLp6QQ7gBoblsnubRULNY132I0J1QKMJ+JTbMqz4sw==",+ "dependencies": {+ "string.prototype.codepointat": "^0.2.1",+ "tiny-inflate": "^1.0.3"+ },+ "bin": {+ "ot": "bin/ot"+ },+ "engines": {+ "node": ">= 8.0.0"+ }+ },"node_modules/optionator": {"version": "0.9.1","license": "MIT",@@ -32382,6 +32722,11 @@"node": ">=0.10.0"}},+ "node_modules/potpack": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/potpack/-/potpack-1.0.2.tgz",+ "integrity": "sha512-choctRBIV9EMT9WGAZHn3V7t0Z2pMQyl0EZE6pFc/6ml3ssw7Dlf/oAOvFwjm1HVsqfQN8GfeFyJ+d8tRzqueQ=="+ },"node_modules/preact": {"version": "10.15.1","license": "MIT",@@ -32890,6 +33235,17 @@"react": "^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0"}},+ "node_modules/react-composer": {+ "version": "5.0.3",+ "resolved": "https://registry.npmjs.org/react-composer/-/react-composer-5.0.3.tgz",+ "integrity": "sha512-1uWd07EME6XZvMfapwZmc7NgCZqDemcvicRi3wMJzXsQLvZ3L7fTHVyPy1bZdnWXM4iPjYuNE+uJ41MLKeTtnA==",+ "dependencies": {+ "prop-types": "^15.6.0"+ },+ "peerDependencies": {+ "react": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0"+ }+ },"node_modules/react-contexify": {"version": "5.0.0","license": "MIT",@@ -33278,7 +33634,6 @@},"node_modules/react-merge-refs": {"version": "1.1.0",- "dev": true,"license": "MIT","funding": {"type": "github",@@ -33314,6 +33669,22 @@"version": "3.2.2","license": "MIT"},+ "node_modules/react-reconciler": {+ "version": "0.26.2",+ "resolved": "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.26.2.tgz",+ "integrity": "sha512-nK6kgY28HwrMNwDnMui3dvm3rCFjZrcGiuwLc5COUipBK5hWHLOxMJhSnSomirqWwjPBJKV1QcbkI0VJr7Gl1Q==",+ "dependencies": {+ "loose-envify": "^1.1.0",+ "object-assign": "^4.1.1",+ "scheduler": "^0.20.2"+ },+ "engines": {+ "node": ">=0.10.0"+ },+ "peerDependencies": {+ "react": "^17.0.2"+ }+ },"node_modules/react-redux": {"version": "7.2.9","license": "MIT",@@ -33490,6 +33861,11 @@"react": ">= 0.14.0"}},+ "node_modules/react-three-fiber": {+ "version": "0.0.0-deprecated",+ "resolved": "https://registry.npmjs.org/react-three-fiber/-/react-three-fiber-0.0.0-deprecated.tgz",+ "integrity": "sha512-EblIqTAsIpkYeM8bZtC4lcpTE0A2zCEGipFB52RgcQq/q+0oryrk7Sxt+sqhIjUu6xMNEVywV8dr74lz5yWO6A=="+ },"node_modules/react-tooltip": {"version": "4.5.1","license": "MIT",@@ -33597,6 +33973,18 @@"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"}},+ "node_modules/react-use-measure": {+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/react-use-measure/-/react-use-measure-2.1.1.tgz",+ "integrity": "sha512-nocZhN26cproIiIduswYpV5y5lQpSQS1y/4KuvUCjSKmw7ZWIS/+g3aFnX3WdBkyuGUtTLif3UTqnLLhbDoQig==",+ "dependencies": {+ "debounce": "^1.2.1"+ },+ "peerDependencies": {+ "react": ">=16.13",+ "react-dom": ">=16.13"+ }+ },"node_modules/react-virtualized-auto-sizer": {"version": "1.0.18","license": "MIT",@@ -34002,6 +34390,11 @@"dev": true,"license": "MIT"},+ "node_modules/regexp-to-ast": {+ "version": "0.5.0",+ "resolved": "https://registry.npmjs.org/regexp-to-ast/-/regexp-to-ast-0.5.0.tgz",+ "integrity": "sha512-tlbJqcMHnPKI9zSrystikWKwHkBqu2a/Sgw01h3zFjvYrMxEDYHzzoMZnUrbIfpTFEsoRnnviOXNCzFiSc54Qw=="+ },"node_modules/regexp.prototype.flags": {"version": "1.5.0","license": "MIT",@@ -35979,6 +36372,11 @@"node": ">=0.10.0"}},+ "node_modules/stats.js": {+ "version": "0.17.0",+ "resolved": "https://registry.npmjs.org/stats.js/-/stats.js-0.17.0.tgz",+ "integrity": "sha512-hNKz8phvYLPEcRkeG1rsGmV5ChMjKDAWU7/OJJdDErPBNChQXxCo3WZurGpnWc6gZhAzEPFad1aVgyOANH1sMw=="+ },"node_modules/statuses": {"version": "2.0.1","dev": true,@@ -36351,6 +36749,11 @@"version": "8.0.0","license": "MIT"},+ "node_modules/string.prototype.codepointat": {+ "version": "0.2.1",+ "resolved": "https://registry.npmjs.org/string.prototype.codepointat/-/string.prototype.codepointat-0.2.1.tgz",+ "integrity": "sha512-2cBVCj6I4IOvEnjgO/hWqXjqBGsY+zwPmHl12Srk9IXSZ56Jwwmy+66XO5Iut/oQVR7t5ihYdLB0GMa4alEUcg=="+ },"node_modules/string.prototype.matchall": {"version": "4.0.8","license": "MIT",@@ -36722,6 +37125,14 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/suspend-react": {+ "version": "0.0.8",+ "resolved": "https://registry.npmjs.org/suspend-react/-/suspend-react-0.0.8.tgz",+ "integrity": "sha512-ZC3r8Hu1y0dIThzsGw0RLZplnX9yXwfItcvaIzJc2VQVi8TGyGDlu92syMB5ulybfvGLHAI5Ghzlk23UBPF8xg==",+ "peerDependencies": {+ "react": ">=17.0"+ }+ },"node_modules/swiper": {"version": "6.8.4","funding": [@@ -37097,6 +37508,40 @@"node": ">=0.8"}},+ "node_modules/three": {+ "version": "0.154.0",+ "resolved": "https://registry.npmjs.org/three/-/three-0.154.0.tgz",+ "integrity": "sha512-Uzz8C/5GesJzv8i+Y2prEMYUwodwZySPcNhuJUdsVMH2Yn4Nm8qlbQe6qRN5fOhg55XB0WiLfTPBxVHxpE60ug=="+ },+ "node_modules/three-mesh-bvh": {+ "version": "0.5.24",+ "resolved": "https://registry.npmjs.org/three-mesh-bvh/-/three-mesh-bvh-0.5.24.tgz",+ "integrity": "sha512-VTIgfjz8aFoPKTQoMIQQv9jJD4ybFRZuKKE1/kqy78FQcuHQ0+iIWv7C5cSb2inlvs7bNMVY3yRx3RXGZfrvzQ==",+ "peerDependencies": {+ "three": ">= 0.123.0"+ }+ },+ "node_modules/three-stdlib": {+ "version": "2.23.13",+ "resolved": "https://registry.npmjs.org/three-stdlib/-/three-stdlib-2.23.13.tgz",+ "integrity": "sha512-WU4XHs4E6szAyoREzTs5bUAc1WFadiz5jRjNlA7aIIqf+raT4jfA320P0XmlyZz/wJwmpZnOuki4kAFsmadkTQ==",+ "dependencies": {+ "@types/draco3d": "^1.4.0",+ "@types/offscreencanvas": "^2019.6.4",+ "@types/webxr": "^0.5.2",+ "chevrotain": "^10.1.2",+ "draco3d": "^1.4.1",+ "fflate": "^0.6.9",+ "ktx-parse": "^0.4.5",+ "mmd-parser": "^1.0.4",+ "opentype.js": "^1.3.3",+ "potpack": "^1.0.1",+ "zstddec": "^0.0.2"+ },+ "peerDependencies": {+ "three": ">=0.128.0"+ }+ },"node_modules/throat": {"version": "6.0.2","dev": true,@@ -37131,6 +37576,11 @@"version": "2.1.0","license": "MIT"},+ "node_modules/tiny-inflate": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz",+ "integrity": "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw=="+ },"node_modules/tiny-invariant": {"version": "1.3.1","license": "MIT"@@ -37330,6 +37780,33 @@"url": "https://github.com/sponsors/wooorm"}},+ "node_modules/troika-three-text": {+ "version": "0.46.4",+ "resolved": "https://registry.npmjs.org/troika-three-text/-/troika-three-text-0.46.4.tgz",+ "integrity": "sha512-Qsv0HhUKTZgSmAJs5wvO7YlBoJSP9TGPLmrg+K9pbQq4lseQdcevbno/WI38bwJBZ/qS56hvfqEzY0zUEFzDIw==",+ "dependencies": {+ "bidi-js": "^1.0.2",+ "troika-three-utils": "^0.46.0",+ "troika-worker-utils": "^0.46.0",+ "webgl-sdf-generator": "1.1.1"+ },+ "peerDependencies": {+ "three": ">=0.103.0"+ }+ },+ "node_modules/troika-three-utils": {+ "version": "0.46.0",+ "resolved": "https://registry.npmjs.org/troika-three-utils/-/troika-three-utils-0.46.0.tgz",+ "integrity": "sha512-llHyrXAcwzr0bpg80GxsIp73N7FuImm4WCrKDJkAqcAsWmE5pfP9+Qzw+oMWK1P/AdHQ79eOrOl9NjyW4aOw0w==",+ "peerDependencies": {+ "three": ">=0.103.0"+ }+ },+ "node_modules/troika-worker-utils": {+ "version": "0.46.0",+ "resolved": "https://registry.npmjs.org/troika-worker-utils/-/troika-worker-utils-0.46.0.tgz",+ "integrity": "sha512-bzOx5f2ZBxkFhXtIvDJlLn2AI3bzCkGVbCndl/2dL5QZrwHEKl45OEIilCxYQQWJG1rEbOD9O80tMjoYjw19OA=="+ },"node_modules/trough": {"version": "1.0.5","license": "MIT",@@ -38370,6 +38847,17 @@"node": ">=0.10.0"}},+ "node_modules/use-asset": {+ "version": "1.0.4",+ "resolved": "https://registry.npmjs.org/use-asset/-/use-asset-1.0.4.tgz",+ "integrity": "sha512-7/hqDrWa0iMnCoET9W1T07EmD4Eg/Wmoj/X8TGBc++ECRK4m5yTsjP4O6s0yagbxfqIOuUkIxe2/sA+VR2GxZA==",+ "dependencies": {+ "fast-deep-equal": "^3.1.3"+ },+ "peerDependencies": {+ "react": ">=17.0"+ }+ },"node_modules/use-callback-ref": {"version": "1.3.0","license": "MIT",@@ -38477,6 +38965,14 @@"dev": true,"license": "MIT"},+ "node_modules/utility-types": {+ "version": "3.10.0",+ "resolved": "https://registry.npmjs.org/utility-types/-/utility-types-3.10.0.tgz",+ "integrity": "sha512-O11mqxmi7wMKCo6HKFt5AhO4BwY3VV68YU07tgxfz8zJTIxr4BpsezN49Ffwy9j3ZpwwJp4fkRwjRzq3uWE6Rg==",+ "engines": {+ "node": ">= 4"+ }+ },"node_modules/utils-merge": {"version": "1.0.1","dev": true,@@ -39109,6 +39605,16 @@"version": "1.2.0","license": "Apache-2.0"},+ "node_modules/webgl-constants": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/webgl-constants/-/webgl-constants-1.1.1.tgz",+ "integrity": "sha512-LkBXKjU5r9vAW7Gcu3T5u+5cvSvh5WwINdr0C+9jpzVB41cjQAP5ePArDtk/WHYdVj0GefCgM73BA7FlIiNtdg=="+ },+ "node_modules/webgl-sdf-generator": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/webgl-sdf-generator/-/webgl-sdf-generator-1.1.1.tgz",+ "integrity": "sha512-9Z0JcMTFxeE+b2x1LJTdnaT8rT8aEp7MVxkNwoycNmJWwPdzoXzMh0BjJSh/AEFP+KPYZUli814h8bJZFIZ2jA=="+ },"node_modules/webidl-conversions": {"version": "6.1.0","dev": true,@@ -39895,6 +40401,27 @@"url": "https://github.com/sponsors/colinhacks"}},+ "node_modules/zstddec": {+ "version": "0.0.2",+ "resolved": "https://registry.npmjs.org/zstddec/-/zstddec-0.0.2.tgz",+ "integrity": "sha512-DCo0oxvcvOTGP/f5FA6tz2Z6wF+FIcEApSTu0zV5sQgn9hoT5lZ9YRAKUraxt9oP7l4e8TnNdi8IZTCX6WCkwA=="+ },+ "node_modules/zustand": {+ "version": "3.7.2",+ "resolved": "https://registry.npmjs.org/zustand/-/zustand-3.7.2.tgz",+ "integrity": "sha512-PIJDIZKtokhof+9+60cpockVOq05sJzHCriyvaLBmEJixseQ1a5Kdov6fWZfWOu5SK9c+FhH1jU0tntLxRJYMA==",+ "engines": {+ "node": ">=12.7.0"+ },+ "peerDependencies": {+ "react": ">=16.8"+ },+ "peerDependenciesMeta": {+ "react": {+ "optional": true+ }+ }+ },"node_modules/zwitch": {"version": "2.0.4","license": "MIT",diff --git a/packages/common/hooks/index.ts b/packages/common/hooks/index.tsindex 65b5a76ec98..12b0a79170f 100644--- a/packages/common/hooks/index.ts+++ b/packages/common/hooks/index.ts@@ -1,3 +1,4 @@export * from './useBreakpoint'+export * from './useDebounce'export * from './useParams'export * from './useTelemetryProps'diff --git a/packages/common/hooks/useDebounce.tsx b/packages/common/hooks/useDebounce.tsxnew file mode 100644index 00000000000..9f70e50df7f--- /dev/null+++ b/packages/common/hooks/useDebounce.tsx@@ -0,0 +1,20 @@+import { useEffect, useMemo, useRef } from 'react'+import { debounce } from 'lodash'++export const useDebounce = (callback: () => void, delay: number = 1000) => {+ const ref = useRef<any>()++ useEffect(() => {+ ref.current = callback+ }, [callback])++ const debouncedCallback = useMemo(() => {+ const func = () => {+ ref.current?.()+ }++ return debounce(func, delay)+ }, [])++ return debouncedCallback+}diff --git a/packages/config/ui.config.js b/packages/config/ui.config.jsindex 1683f2178a5..be34a9cf667 100644--- a/packages/config/ui.config.js+++ b/packages/config/ui.config.js@@ -257,8 +257,8 @@ const uiConfig = {},},animation: {- 'fade-in': 'fadeIn 300ms',- 'fade-out': 'fadeOut 300ms',+ 'fade-in': 'fadeIn 300ms both',+ 'fade-out': 'fadeOut 300ms both','dropdown-content-show': 'overlayContentShow 100ms cubic-bezier(0.16, 1, 0.3, 1)','dropdown-content-hide': 'overlayContentHide 100ms cubic-bezier(0.16, 1, 0.3, 1)',diff --git a/packages/ui/index.tsx b/packages/ui/index.tsxindex ae5581d03ea..88f5d9b0ef5 100644--- a/packages/ui/index.tsx+++ b/packages/ui/index.tsx@@ -62,6 +62,9 @@ export * from './src/components/Form'// CMD+Kexport * from './src/components/Command'+// Widgets+export * from './src/components/CountdownWidget'+// layoutexport * from './src/components/LoadingLine'diff --git a/packages/ui/src/components/CountdownWidget/CountdownStep.tsx b/packages/ui/src/components/CountdownWidget/CountdownStep.tsxnew file mode 100644index 00000000000..b1521b5ff24--- /dev/null+++ b/packages/ui/src/components/CountdownWidget/CountdownStep.tsx@@ -0,0 +1,17 @@+interface CountdownStepProps {+ value: string | number+ unit: string+}++function CountdownStep({ value, unit }: CountdownStepProps) {+ return (+ <div className="rounded-md p-[1px] overflow-hidden bg-gradient-to-b from-[#514b6130] to-[#514b6100]">+ <div className="py-1 px-2 rounded-md w-11 leading-4 flex items-center justify-center bg-gradient-to-b from-[#51269c40] to-[#DBB8BF10] backdrop-blur-md">+ <span className="m-0">{value}</span>+ <span>{unit}</span>+ </div>+ </div>+ )+}++export default CountdownStepdiff --git a/packages/ui/src/components/CountdownWidget/CountdownWidget.tsx b/packages/ui/src/components/CountdownWidget/CountdownWidget.tsxnew file mode 100644index 00000000000..ed61492064b--- /dev/null+++ b/packages/ui/src/components/CountdownWidget/CountdownWidget.tsx@@ -0,0 +1,34 @@+import CountdownStep from './CountdownStep'++interface CountdownWidgetProps {+ days?: string+ hours?: string+ minutes?: string+ seconds?: string+}++function CountdownWidget({ days, hours, minutes, seconds }: CountdownWidgetProps) {+ return (+ <div className="flex gap-1 items-center">+ {days !== undefined && (+ <>+ <CountdownStep value={days} unit="d" /> :+ </>+ )}+ {hours !== undefined && (+ <>+ <CountdownStep value={hours} unit="h" /> :+ </>+ )}+ {minutes !== undefined && (+ <>+ <CountdownStep value={minutes} unit="m" />+ {seconds !== undefined && ' :'}+ </>+ )}+ {seconds !== undefined && <CountdownStep value={seconds} unit="s" />}+ </div>+ )+}++export default CountdownWidgetdiff --git a/packages/ui/src/components/CountdownWidget/index.ts b/packages/ui/src/components/CountdownWidget/index.tsnew file mode 100644index 00000000000..0c677d46517--- /dev/null+++ b/packages/ui/src/components/CountdownWidget/index.ts@@ -0,0 +1 @@+export { default as CountdownWidget } from './CountdownWidget'diff --git a/packages/ui/src/layout/banners/Announcement.tsx b/packages/ui/src/layout/banners/Announcement.tsxindex 505c20b36bc..6613c5f4aee 100644--- a/packages/ui/src/layout/banners/Announcement.tsx+++ b/packages/ui/src/layout/banners/Announcement.tsx@@ -58,11 +58,11 @@ const Announcement = ({return (<divonClick={() => window.location.assign(announcement.link)}- className={['relative w-full cursor-pointer', className].join(' ')}+ className={['relative z-40 w-full cursor-pointer', className].join(' ')}>{!isLaunchWeekSection && (<div- className="absolute right-4 flex h-full items-center opacity-50 transition-opacity hover:opacity-100"+ className="absolute z-50 right-4 flex h-full items-center opacity-100 text-white transition-opacity hover:opacity-100"onClick={handleClose}><IconX size={16} />diff --git a/packages/ui/src/layout/banners/Announcement.Countdown.tsx b/packages/ui/src/layout/banners/LW8CountdownBanner/LW8CountdownBanner.tsxsimilarity index 52%rename from packages/ui/src/layout/banners/Announcement.Countdown.tsxrename to packages/ui/src/layout/banners/LW8CountdownBanner/LW8CountdownBanner.tsxindex 8031b9ab36d..e1b9a590ff1 100644--- a/packages/ui/src/layout/banners/Announcement.Countdown.tsx+++ b/packages/ui/src/layout/banners/LW8CountdownBanner/LW8CountdownBanner.tsx@@ -1,13 +1,10 @@import { useRouter } from 'next/router'import { PropsWithChildren } from 'react'import Countdown from 'react-countdown'-import { AnnouncementProps } from './Announcement'-import _announcement from './data/Announcement.json'--interface CountdownStepProps {- value: string | number- unit: string-}+import { AnnouncementProps } from '../Announcement'+import _announcement from '../data/Announcement.json'+import CountdownWidget from '../../../components/CountdownWidget/CountdownWidget'+import Lw8BannerBg from './Lw8BannerBg'interface CountdownButtonProps {dest: string@@ -15,41 +12,32 @@ interface CountdownButtonProps {const announcement = _announcement as AnnouncementProps-function CountdownStep({ value, unit }: CountdownStepProps) {- return (- <div className="rounded-md p-[1px] overflow-hidden bg-gradient-to-b from-[#FFFFFF50] to-[#FFFFFF00]">- <div className="py-1 px-2 rounded-md leading-4 flex items-center justify-center bg-gradient-to-b from-[#9E44EF40] to-[#DBB8BF40] backdrop-blur-md">- <span className="m-0">{value}</span>- <span>{unit}</span>- </div>- </div>- )-}-function CountdownButton({ children, dest }: PropsWithChildren<CountdownButtonProps>) {return (<ahref={dest}- className="bg-white text-xs px-1.5 md:px-2.5 py-1 rounded-full text-[#9E44EF] shadow-none hover:shadow-mg cursor-pointer"+ className="bg-white text-xs px-1.5 md:px-2.5 py-1 rounded-full text-black shadow-none hover:shadow-mg cursor-pointer">{children}</a>)}-function CountdownBanner() {+export function LW8CountdownBanner() {const { pathname } = useRouter()const isLaunchWeekPage = pathname === '/launch-week'const isLaunchWeekSection = pathname.includes('launch-week')+ if (isLaunchWeekPage) return null+const renderer = ({ days, hours, minutes, seconds, completed }: any) => {if (completed) {// Render a completed statereturn (<div className="w-full flex gap-3 md:gap-6 items-center justify-center">- <p>Supabase Launch Week 7</p>+ <p>Supabase Launch Week 8</p><div>- <CountdownButton dest="/launch-week">Explore</CountdownButton>+ <CountdownButton dest="https://supabase.com/launch-week">Live now</CountdownButton></div></div>)@@ -63,17 +51,16 @@ function CountdownBanner() {].join(' ')}><p>- <span className="hidden md:inline">Supabase</span> Launch Week 7+ <span className="hidden md:inline">Supabase</span> Launch Week 8</p><div className="flex gap-1 items-center">- <CountdownStep value={days} unit="d" /> :- <CountdownStep value={hours} unit="h" /> :- <CountdownStep value={minutes} unit="m" /> :- <CountdownStep value={seconds} unit="s" />+ <CountdownWidget days={days} hours={hours} minutes={minutes} seconds={seconds} /></div>{!isLaunchWeekPage && (<div className="hidden md:block">- <CountdownButton dest="/launch-week">Get your ticket</CountdownButton>+ <CountdownButton dest="https://supabase.com/launch-week">+ Get your ticket+ </CountdownButton></div>)}</div>@@ -82,10 +69,19 @@ function CountdownBanner() {}return (- <div className="w-full h-14 p-2 bg-gradient-to-r from-[#9E44EF] to-[#DBB8BF] bg-blue-300 flex items-center justify-center text-white">- <Countdown date={new Date(announcement.launchDate)} renderer={renderer} />+ <div+ className="relative w-full h-14 p-2 flex items-center justify-center text-white !bg-cover !bg-center overflow-hidden"+ style={{+ background:+ 'linear-gradient(to right, #020405 10%, #1D0B31 40%, #1B113B 50%, #122029 70%, #020405 90%)',+ }}+ >+ <div className="relative z-10 flex items-center justify-center">+ <Countdown date={new Date(announcement.launchDate)} renderer={renderer} />+ </div>+ <Lw8BannerBg className="absolute z-0 inset-0 w-full flex items-center justify-center h-auto min-h-full [&>svg]:w-auto [&>svg]:h-[40%] md:[&>svg]:h-[64%]" /></div>)}-export default CountdownBanner+export default LW8CountdownBannerdiff --git a/packages/ui/src/layout/banners/LW8CountdownBanner/Lw8BannerBg.tsx b/packages/ui/src/layout/banners/LW8CountdownBanner/Lw8BannerBg.tsxnew file mode 100644index 00000000000..72fc431e99c--- /dev/null+++ b/packages/ui/src/layout/banners/LW8CountdownBanner/Lw8BannerBg.tsx@@ -0,0 +1,224 @@+export default function Lw8BannerBg({ className }: { className?: string }) {+ return (+ <div className={className}>+ <svg+ width="672"+ height="33"+ viewBox="0 0 672 33"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ >+ <circle cx="24.75" cy="27.75" r="0.75" fill="#FFFFF9" fillOpacity="0.3" />+ <circle+ cx="55.9193"+ cy="24.9189"+ r="0.75"+ transform="rotate(165 55.9193 24.9189)"+ fill="#FFFFF9"+ fillOpacity="0.3"+ />+ <circle+ cx="68.9193"+ cy="25.9189"+ r="0.75"+ transform="rotate(165 68.9193 25.9189)"+ fill="#FFFFF9"+ fillOpacity="0.3"+ />+ <circle+ cx="54.2182"+ cy="14.4814"+ r="0.75"+ transform="rotate(165 54.2182 14.4814)"+ fill="#FFFFF9"+ fillOpacity="0.3"+ />+ <circle+ cx="30.9076"+ cy="7.90677"+ r="0.9"+ transform="rotate(89.5676 30.9076 7.90677)"+ fill="#FFFFF9"+ />+ <circle+ cx="61.9076"+ cy="31.9068"+ r="0.9"+ transform="rotate(89.5676 61.9076 31.9068)"+ fill="#FFFFF9"+ />+ <circle+ cx="9.37818"+ cy="15.1301"+ r="0.75"+ transform="rotate(16.7993 9.37818 15.1301)"+ fill="#FFFFF9"+ fillOpacity="0.3"+ />+ <circle+ cx="39.1633"+ cy="16.8098"+ r="0.75"+ transform="rotate(16.7993 39.1633 16.8098)"+ fill="#FFFFF9"+ fillOpacity="0.3"+ />+ <circle+ cx="71.3684"+ cy="3.55194"+ r="0.75"+ transform="rotate(16.7993 71.3684 3.55194)"+ fill="#FFFFF9"+ fillOpacity="0.3"+ />+ <circle+ cx="46.7368"+ cy="23.4534"+ r="0.75"+ transform="rotate(-178.201 46.7368 23.4534)"+ fill="#FFFFF9"+ fillOpacity="0.3"+ />+ <circle+ cx="58.8931"+ cy="28.1682"+ r="0.75"+ transform="rotate(-178.201 58.8931 28.1682)"+ fill="#FFFFF9"+ fillOpacity="0.3"+ />+ <circle+ cx="48.1235"+ cy="12.969"+ r="0.75"+ transform="rotate(-178.201 48.1235 12.969)"+ fill="#FFFFF9"+ fillOpacity="0.3"+ />+ <circle+ cx="1.11724"+ cy="17.1177"+ r="0.9"+ transform="rotate(106.367 1.11724 17.1177)"+ fill="#FFFFF9"+ />+ <circle+ cx="0.75"+ cy="0.75"+ r="0.75"+ transform="matrix(-1 0 0 1 654.5 25)"+ fill="#FFFFF9"+ fillOpacity="0.3"+ />+ <circle+ cx="0.75"+ cy="0.75"+ r="0.75"+ transform="matrix(-1 0 0 1 625.5 18)"+ fill="#FFFFF9"+ fillOpacity="0.3"+ />+ <circle+ cx="0.75"+ cy="0.75"+ r="0.75"+ transform="matrix(0.965926 0.258819 0.258819 -0.965926 614.662 23.4492)"+ fill="#FFFFF9"+ fillOpacity="0.3"+ />+ <circle+ cx="0.75"+ cy="0.75"+ r="0.75"+ transform="matrix(0.965926 0.258819 0.258819 -0.965926 601.662 24.4492)"+ fill="#FFFFF9"+ fillOpacity="0.3"+ />+ <circle+ cx="0.75"+ cy="0.75"+ r="0.75"+ transform="matrix(0.965926 0.258819 0.258819 -0.965926 616.363 13.0117)"+ fill="#FFFFF9"+ fillOpacity="0.3"+ />+ <circle+ cx="0.9"+ cy="0.9"+ r="0.9"+ transform="matrix(-0.0075466 0.999972 0.999972 0.0075466 639.699 5)"+ fill="#FFFFF9"+ />+ <circle+ cx="0.9"+ cy="0.9"+ r="0.9"+ transform="matrix(-0.0075466 0.999972 0.999972 0.0075466 608.699 29)"+ fill="#FFFFF9"+ />+ <circle+ cx="0.75"+ cy="0.75"+ r="0.75"+ transform="matrix(-0.957323 0.28902 0.28902 0.957323 662.623 12.1953)"+ fill="#FFFFF9"+ fillOpacity="0.3"+ />+ <circle+ cx="0.75"+ cy="0.75"+ r="0.75"+ transform="matrix(-0.957323 0.28902 0.28902 0.957323 632.838 13.875)"+ fill="#FFFFF9"+ fillOpacity="0.3"+ />+ <circle+ cx="0.75"+ cy="0.75"+ r="0.75"+ transform="matrix(-0.957323 0.28902 0.28902 0.957323 600.633 0.617188)"+ fill="#FFFFF9"+ fillOpacity="0.3"+ />+ <circle+ cx="0.75"+ cy="0.75"+ r="0.75"+ transform="matrix(0.999507 -0.0313981 -0.0313981 -0.999507 624.037 22.2266)"+ fill="#FFFFF9"+ fillOpacity="0.3"+ />+ <circle+ cx="0.75"+ cy="0.75"+ r="0.75"+ transform="matrix(0.999507 -0.0313981 -0.0313981 -0.999507 611.881 26.9414)"+ fill="#FFFFF9"+ fillOpacity="0.3"+ />+ <circle+ cx="0.75"+ cy="0.75"+ r="0.75"+ transform="matrix(0.999507 -0.0313981 -0.0313981 -0.999507 622.65 11.7422)"+ fill="#FFFFF9"+ fillOpacity="0.3"+ />+ <circle+ cx="0.9"+ cy="0.9"+ r="0.9"+ transform="matrix(0.281787 0.959477 0.959477 -0.281787 669.266 14.5078)"+ fill="#FFFFF9"+ />+ <circle+ cx="0.9"+ cy="0.9"+ r="0.9"+ transform="matrix(0.281787 0.959477 0.959477 -0.281787 602.266 8.50781)"+ fill="#FFFFF9"+ />+ </svg>+ </div>+ )+}diff --git a/packages/ui/src/layout/banners/LW8CountdownBanner/index.ts b/packages/ui/src/layout/banners/LW8CountdownBanner/index.tsnew file mode 100644index 00000000000..f87f7ca1cb9--- /dev/null+++ b/packages/ui/src/layout/banners/LW8CountdownBanner/index.ts@@ -0,0 +1 @@+export { LW8CountdownBanner } from './LW8CountdownBanner'diff --git a/packages/ui/src/layout/banners/data/Announcement.json b/packages/ui/src/layout/banners/data/Announcement.jsonindex f8a5db4f13e..abb5cec8362 100644--- a/packages/ui/src/layout/banners/data/Announcement.json+++ b/packages/ui/src/layout/banners/data/Announcement.json@@ -1,7 +1,7 @@{"show": true,- "text": "Supabase Launch Week 7",- "launchDate": "2023-04-10T07:00:00.000-07:00",+ "text": "Supabase Launch Week 8",+ "launchDate": "2023-08-07T09:00:00.000-07:00","link": "https://supabase.com/launch-week","badge": "Get your ticket"}diff --git a/packages/ui/src/layout/banners/index.tsx b/packages/ui/src/layout/banners/index.tsxindex 88c3f4190ac..49a7d6ec582 100644--- a/packages/ui/src/layout/banners/index.tsx+++ b/packages/ui/src/layout/banners/index.tsx@@ -1,2 +1,2 @@export { default as Announcement } from './Announcement'-export { default as AnnouncementCountdown } from './Announcement.Countdown'+export { default as LW8CountdownBanner } from './LW8CountdownBanner/LW8CountdownBanner'