Connect, collaborate, and grow with a community of TypeScript developers
(chore) move landing/waitlist to _components (#546)
bautistaaa938aa3a6904a
diff --git a/apps/web/src/components/landing/community/community.module.css b/apps/web/src/app/_components/community/community.module.csssimilarity index 100%rename from apps/web/src/components/landing/community/community.module.cssrename to apps/web/src/app/_components/community/community.module.cssdiff --git a/apps/web/src/components/landing/community/community.tsx b/apps/web/src/app/_components/community/community.tsxsimilarity index 99%rename from apps/web/src/components/landing/community/community.tsxrename to apps/web/src/app/_components/community/community.tsxindex 942449de..cc23bd8f 100644--- a/apps/web/src/components/landing/community/community.tsx+++ b/apps/web/src/app/_components/community/community.tsx@@ -5,7 +5,7 @@ import { clsx } from 'clsx';import { type CSSProperties } from 'react';import { useInView } from 'react-intersection-observer';import { contributors } from '../../../../public/contributors';-import styles from '~/components/landing/community/community.module.css';+import styles from './community.module.css';import Image from 'next/image';function Community() {diff --git a/apps/web/src/components/landing/feature-card.tsx b/apps/web/src/app/_components/feature-card.tsxsimilarity index 99%rename from apps/web/src/components/landing/feature-card.tsxrename to apps/web/src/app/_components/feature-card.tsxindex f4b21baf..52f7b844 100644--- a/apps/web/src/components/landing/feature-card.tsx+++ b/apps/web/src/app/_components/feature-card.tsx@@ -17,8 +17,8 @@ import { useEffect, useState, type MouseEvent } from 'react';import { useInView } from 'react-intersection-observer';import { z } from 'zod';import { TrackChallenge } from '~/app/tracks/_components/track-challenge-card';+import { Steps } from '~/components/wizard/Steps';import { useIsMobile } from '~/utils/useIsMobile';-import { Steps } from '../wizard/Steps';type WrapperStyle = MotionStyle & {'--x': MotionValue<string>;diff --git a/apps/web/src/components/landing/features.tsx b/apps/web/src/app/_components/features.tsxsimilarity index 99%rename from apps/web/src/components/landing/features.tsxrename to apps/web/src/app/_components/features.tsxindex 2434d7d5..b400d6b2 100644--- a/apps/web/src/components/landing/features.tsx+++ b/apps/web/src/app/_components/features.tsx@@ -1,12 +1,6 @@import { Balancer } from 'react-wrap-balancer';import clsx from 'clsx';import Image from 'next/image';-import {- ImageCard,- CollaborativeEnvironmentCard,- ChallengeCreationCard,- CuratedTracksCard,-} from '~/components/landing/feature-card';import DogeSmile from '~/assets/images/doge.webp';import FeatureCardChallengeDark1 from '~/assets/images/feature_card_challenge_dark1.png';import FeatureCardChallengeDark2 from '~/assets/images/feature_card_challenge_dark2.png';@@ -22,6 +16,12 @@ import Step2Dark1 from '~/assets/images/step2dark1.png';import Step2Dark2 from '~/assets/images/step2dark2.png';import Step3Light from '~/assets/images/step3light.png';import Step3Dark from '~/assets/images/step3dark.png';+import {+ ImageCard,+ CollaborativeEnvironmentCard,+ ChallengeCreationCard,+ CuratedTracksCard,+} from './feature-card';function Features() {return (diff --git a/apps/web/src/components/landing/hero-challenge-card.tsx b/apps/web/src/app/_components/hero-challenge-card.tsxsimilarity index 100%rename from apps/web/src/components/landing/hero-challenge-card.tsxrename to apps/web/src/app/_components/hero-challenge-card.tsxdiff --git a/apps/web/src/components/landing/hero-illustration.tsx b/apps/web/src/app/_components/hero-illustration.tsxsimilarity index 96%rename from apps/web/src/components/landing/hero-illustration.tsxrename to apps/web/src/app/_components/hero-illustration.tsxindex bc1fd546..cf91f4c9 100644--- a/apps/web/src/components/landing/hero-illustration.tsx+++ b/apps/web/src/app/_components/hero-illustration.tsx@@ -1,8 +1,8 @@'use client';import { motion } from 'framer-motion';-import { HeroChallengeCard } from '~/components/landing/hero-challenge-card';import { useIsMobile } from '~/utils/useIsMobile';+import { HeroChallengeCard } from './hero-challenge-card';export function HeroIllustration() {const isMobile = useIsMobile();diff --git a/apps/web/src/components/landing/hero.tsx b/apps/web/src/app/_components/hero.tsxsimilarity index 100%rename from apps/web/src/components/landing/hero.tsxrename to apps/web/src/app/_components/hero.tsxdiff --git a/apps/web/src/components/landing/waitlist/banner.tsx b/apps/web/src/app/_components/waitlist-banner.tsxsimilarity index 94%rename from apps/web/src/components/landing/waitlist/banner.tsxrename to apps/web/src/app/_components/waitlist-banner.tsxindex e361098b..385c49ac 100644--- a/apps/web/src/components/landing/waitlist/banner.tsx+++ b/apps/web/src/app/_components/waitlist-banner.tsx@@ -3,9 +3,9 @@ import { clsx } from 'clsx';import { Mail } from '@repo/ui/icons';import { Balancer } from 'react-wrap-balancer';import { Button } from '@repo/ui';-import styles from '~/components/landing/waitlist/waitlist.module.css';+import styles from './waitlist.module.css';-function Waitlist() {+export function WaitlistBanner() {return (<section className={clsx(styles.backdrop, 'relative overflow-hidden')}><div className="container relative grid grid-cols-1 items-center justify-center py-[64px] md:grid-cols-2">@@ -37,5 +37,3 @@ function Waitlist() {</section>);}--export default Waitlist;diff --git a/apps/web/src/components/landing/waitlist/waitlist.module.css b/apps/web/src/app/_components/waitlist.module.csssimilarity index 57%rename from apps/web/src/components/landing/waitlist/waitlist.module.cssrename to apps/web/src/app/_components/waitlist.module.cssindex e17a164d..adc18965 100644--- a/apps/web/src/components/landing/waitlist/waitlist.module.css+++ b/apps/web/src/app/_components/waitlist.module.css@@ -1,30 +1,3 @@-/* The module for the Waitlist page background */-.waitlistBackground {- top: -56px;- background: linear-gradient(0deg, hsl(var(--background)) 0%, rgba(9, 9, 11, 0) 100%),- linear-gradient(- 270deg,- rgba(59, 131, 199, 0) 44.51%,- rgba(59, 131, 199, 0.17) 75.5%,- rgba(49, 120, 198, 0.3) 100%- ),- linear-gradient(- 90deg,- rgba(59, 199, 182, 0) 22.98%,- rgba(59, 182, 199, 0.17) 67.78%,- rgba(49, 189, 198, 0.3) 100%- );-}--.mybg {- background: url('../../../assets/images/waitlist-bg.webp');- background-position-y: 33%;- background-position-x: center;- background-repeat: no-repeat;- background-size: 111% 200%;- filter: blur(69px);-}-/* The module for the background of the banner on the landing page */.backdrop {background: linear-gradient(@@ -40,7 +13,7 @@rgba(59, 131, 199, 0.17) 75.5%,rgba(49, 120, 198, 0.3) 100%),- url('../../../assets/images/background_pattern.webp');+ url('../../assets/images/background_pattern.webp');background-size: cover;background-position-x: center;background-repeat: no-repeat;diff --git a/apps/web/src/app/page.tsx b/apps/web/src/app/page.tsxindex ae323de6..447d093e 100644--- a/apps/web/src/app/page.tsx+++ b/apps/web/src/app/page.tsx@@ -1,9 +1,9 @@import type { Metadata } from 'next';-import Community from '~/components/landing/community/community';-import Features from '~/components/landing/features';-import Hero from '~/components/landing/hero';-import Waitlist from '~/components/landing/waitlist/banner';import { Footsies } from '~/components/ui/footsies';+import Community from './_components/community/community';+import Features from './_components/features';+import Hero from './_components/hero';+import { WaitlistBanner } from './_components/waitlist-banner';export const metadata: Metadata = {title: 'Typehero',@@ -17,7 +17,7 @@ export default async function Index() {<Hero /><Features /><Community />- <Waitlist />+ <WaitlistBanner /><Footsies /></>);diff --git a/apps/web/src/components/landing/waitlist/create.action.ts b/apps/web/src/app/waitlist/_components/create.action.tssimilarity index 93%rename from apps/web/src/components/landing/waitlist/create.action.tsrename to apps/web/src/app/waitlist/_components/create.action.tsindex 4bd8f4dc..9b5158d9 100644--- a/apps/web/src/components/landing/waitlist/create.action.ts+++ b/apps/web/src/app/waitlist/_components/create.action.ts@@ -3,7 +3,7 @@import { prisma } from '@repo/db';import { Resend } from 'resend';import { UserSignupEmail } from '@repo/emails/emails/index';-import { type WaitlistFormSchema } from '~/components/landing/waitlist/waitlist-form';+import type { WaitlistFormSchema } from './waitlist-form';const resend = new Resend(process.env.RESEND_API_KEY);diff --git a/apps/web/src/components/landing/waitlist/index.tsx b/apps/web/src/app/waitlist/_components/index.tsxsimilarity index 90%rename from apps/web/src/components/landing/waitlist/index.tsxrename to apps/web/src/app/waitlist/_components/index.tsxindex b1ec634f..6ffeed20 100644--- a/apps/web/src/components/landing/waitlist/index.tsx+++ b/apps/web/src/app/waitlist/_components/index.tsx@@ -1,6 +1,6 @@import { Balancer } from 'react-wrap-balancer';-import { WaitlistForm } from '~/components/landing/waitlist/waitlist-form';-import styles from '~/components/landing/waitlist/waitlist.module.css';+import styles from './waitlist.module.css';+import { WaitlistForm } from './waitlist-form';export function Waitlist() {return (diff --git a/apps/web/src/components/landing/waitlist/waitlist-form.tsx b/apps/web/src/app/waitlist/_components/waitlist-form.tsxsimilarity index 98%rename from apps/web/src/components/landing/waitlist/waitlist-form.tsxrename to apps/web/src/app/waitlist/_components/waitlist-form.tsxindex 42684ea7..d45ab4a3 100644--- a/apps/web/src/components/landing/waitlist/waitlist-form.tsx+++ b/apps/web/src/app/waitlist/_components/waitlist-form.tsx@@ -21,7 +21,7 @@ import {SelectTrigger,SelectValue,} from '@repo/ui';-import { uploadWaitlistEntry } from '~/components/landing/waitlist/create.action';+import { uploadWaitlistEntry } from './create.action';const waitlistFormSchema = z.object({name: z.string().min(1, 'Please enter your name'),diff --git a/apps/web/src/app/waitlist/_components/waitlist.module.css b/apps/web/src/app/waitlist/_components/waitlist.module.cssnew file mode 100644index 00000000..f60fc894--- /dev/null+++ b/apps/web/src/app/waitlist/_components/waitlist.module.css@@ -0,0 +1,26 @@+/* The module for the Waitlist page background */+.waitlistBackground {+ top: -56px;+ background: linear-gradient(0deg, hsl(var(--background)) 0%, rgba(9, 9, 11, 0) 100%),+ linear-gradient(+ 270deg,+ rgba(59, 131, 199, 0) 44.51%,+ rgba(59, 131, 199, 0.17) 75.5%,+ rgba(49, 120, 198, 0.3) 100%+ ),+ linear-gradient(+ 90deg,+ rgba(59, 199, 182, 0) 22.98%,+ rgba(59, 182, 199, 0.17) 67.78%,+ rgba(49, 189, 198, 0.3) 100%+ );+}++.mybg {+ background: url('../../../assets/images/waitlist-bg.webp');+ background-position-y: 33%;+ background-position-x: center;+ background-repeat: no-repeat;+ background-size: 111% 200%;+ filter: blur(69px);+}diff --git a/apps/web/src/app/waitlist/page.tsx b/apps/web/src/app/waitlist/page.tsxindex d284da84..50a62eff 100644--- a/apps/web/src/app/waitlist/page.tsx+++ b/apps/web/src/app/waitlist/page.tsx@@ -1 +1 @@-export { Waitlist as default } from '~/components/landing/waitlist';+export { Waitlist as default } from './_components';