Skip to content

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.css
similarity index 100%
rename from apps/web/src/components/landing/community/community.module.css
rename to apps/web/src/app/_components/community/community.module.css
diff --git a/apps/web/src/components/landing/community/community.tsx b/apps/web/src/app/_components/community/community.tsx
similarity index 99%
rename from apps/web/src/components/landing/community/community.tsx
rename to apps/web/src/app/_components/community/community.tsx
index 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.tsx
similarity index 99%
rename from apps/web/src/components/landing/feature-card.tsx
rename to apps/web/src/app/_components/feature-card.tsx
index 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.tsx
similarity index 99%
rename from apps/web/src/components/landing/features.tsx
rename to apps/web/src/app/_components/features.tsx
index 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.tsx
similarity index 100%
rename from apps/web/src/components/landing/hero-challenge-card.tsx
rename to apps/web/src/app/_components/hero-challenge-card.tsx
diff --git a/apps/web/src/components/landing/hero-illustration.tsx b/apps/web/src/app/_components/hero-illustration.tsx
similarity index 96%
rename from apps/web/src/components/landing/hero-illustration.tsx
rename to apps/web/src/app/_components/hero-illustration.tsx
index 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.tsx
similarity index 100%
rename from apps/web/src/components/landing/hero.tsx
rename to apps/web/src/app/_components/hero.tsx
diff --git a/apps/web/src/components/landing/waitlist/banner.tsx b/apps/web/src/app/_components/waitlist-banner.tsx
similarity index 94%
rename from apps/web/src/components/landing/waitlist/banner.tsx
rename to apps/web/src/app/_components/waitlist-banner.tsx
index 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.css
similarity index 57%
rename from apps/web/src/components/landing/waitlist/waitlist.module.css
rename to apps/web/src/app/_components/waitlist.module.css
index 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.tsx
index 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.ts
similarity index 93%
rename from apps/web/src/components/landing/waitlist/create.action.ts
rename to apps/web/src/app/waitlist/_components/create.action.ts
index 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.tsx
similarity index 90%
rename from apps/web/src/components/landing/waitlist/index.tsx
rename to apps/web/src/app/waitlist/_components/index.tsx
index 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.tsx
similarity index 98%
rename from apps/web/src/components/landing/waitlist/waitlist-form.tsx
rename to apps/web/src/app/waitlist/_components/waitlist-form.tsx
index 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.css
new file mode 100644
index 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.tsx
index 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';