Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

Migrated all wording from waitlist -> newsletter, and modified hero section to "Start exploring" (#1275)

Amanuel Odicho40548dfeca37
diff --git a/apps/web/src/app/[locale]/(email)/waitlist/_components/create.action.ts b/apps/web/src/app/[locale]/(email)/newsletter/_components/create.action.ts
similarity index 100%
rename from apps/web/src/app/[locale]/(email)/waitlist/_components/create.action.ts
rename to apps/web/src/app/[locale]/(email)/newsletter/_components/create.action.ts
diff --git a/apps/web/src/app/[locale]/(email)/waitlist/_components/index.tsx b/apps/web/src/app/[locale]/(email)/newsletter/_components/index.tsx
similarity index 68%
rename from apps/web/src/app/[locale]/(email)/waitlist/_components/index.tsx
rename to apps/web/src/app/[locale]/(email)/newsletter/_components/index.tsx
index 4ff429b9..168390f6 100644
--- a/apps/web/src/app/[locale]/(email)/waitlist/_components/index.tsx
+++ b/apps/web/src/app/[locale]/(email)/newsletter/_components/index.tsx
@@ -1,11 +1,11 @@
import { Balancer } from 'react-wrap-balancer';
-import styles from './waitlist.module.css';
-import { WaitlistForm } from './waitlist-form';
+import styles from './newsletter.module.css';
+import { NewsletterForm } from './newsletter-form';
-export function Waitlist({ params: { locale } }: { params: { locale: string } }) {
+export function Newsletter({ params: { locale } }: { params: { locale: string } }) {
return (
<main className="relative min-h-[calc(100vh-56px)] sm:px-16 md:px-0">
- <div className={`${styles.waitlistBackground} fixed left-0 top-0 -z-10 h-full w-full`} />
+ <div className={`${styles.newsletterBackground} fixed left-0 top-0 -z-10 h-full w-full`} />
{/* NOTE: pls dont chang percentages, it's cursed */}
<div
className={`${styles.mybg} fixed -bottom-[64px] left-1/2 -z-10 h-[69%] w-[150%] -translate-x-1/2 opacity-20 sm:opacity-30`}
@@ -14,7 +14,7 @@ export function Waitlist({ params: { locale } }: { params: { locale: string } })
<div className="mx-auto flex max-w-[700px] flex-col items-center justify-center gap-8 text-center">
<h1 className="text-3xl font-bold text-neutral-950 dark:text-neutral-50 md:text-5xl">
<Balancer>
- Join the waitlist to be part of the{' '}
+ Subscribe to be part of the{' '}
<span className="bg-gradient-to-r from-[#3178c6] to-black bg-clip-text font-black text-transparent dark:from-blue-400 dark:to-emerald-400">
TypeHero
</span>{' '}
@@ -23,11 +23,11 @@ export function Waitlist({ params: { locale } }: { params: { locale: string } })
</h1>
<p className="leading-8 text-black/50 dark:text-white/50">
<Balancer>
- By signing up to the waitlist you will be among the first to know when we launch and
- getting early access
+ By subscribing to the TypeHero newsletter, you will be at the forefront of updates,
+ insights, and exclusive content.
</Balancer>
</p>
- <WaitlistForm />
+ <NewsletterForm />
</div>
</div>
</main>
diff --git a/apps/web/src/app/[locale]/(email)/waitlist/_components/waitlist-form.tsx b/apps/web/src/app/[locale]/(email)/newsletter/_components/newsletter-form.tsx
similarity index 92%
rename from apps/web/src/app/[locale]/(email)/waitlist/_components/waitlist-form.tsx
rename to apps/web/src/app/[locale]/(email)/newsletter/_components/newsletter-form.tsx
index bd088f9a..2985802a 100644
--- a/apps/web/src/app/[locale]/(email)/waitlist/_components/waitlist-form.tsx
+++ b/apps/web/src/app/[locale]/(email)/newsletter/_components/newsletter-form.tsx
@@ -19,15 +19,15 @@ import clsx from 'clsx';
import { useForm } from 'react-hook-form';
import { z } from 'zod';
-const waitlistFormSchema = z.object({
+const newsletterFormSchema = z.object({
name: z.string().min(1, 'Please enter your name'),
email: z.string().email(),
intention: z.string(),
});
-export type WaitlistFormSchema = z.infer<typeof waitlistFormSchema>;
+export type NewsletterFormSchema = z.infer<typeof newsletterFormSchema>;
-export function WaitlistForm() {
+export function NewsletterForm() {
const mutation = useMutation({
mutationFn: subscribe,
onSuccess: () => {
@@ -35,15 +35,15 @@ export function WaitlistForm() {
},
});
- const form = useForm<WaitlistFormSchema>({
- resolver: zodResolver(waitlistFormSchema),
+ const form = useForm<NewsletterFormSchema>({
+ resolver: zodResolver(newsletterFormSchema),
defaultValues: {
email: '',
name: '',
},
});
- async function onSubmit(data: WaitlistFormSchema) {
+ async function onSubmit(data: NewsletterFormSchema) {
mutation.mutate(data);
}
@@ -140,7 +140,7 @@ export function WaitlistForm() {
type="submit"
>
<span className="h-full w-full rounded-[10px] bg-white px-4 py-2 text-center font-bold text-black transition-colors duration-300 group-hover:bg-blue-100 dark:bg-black dark:text-white group-hover:dark:bg-cyan-950">
- {mutation.status === 'pending' ? 'Submitting...' : 'Join the waitlist'}
+ {mutation.status === 'pending' ? 'Submitting...' : 'Subscribe'}
</span>
</Button>
</form>
@@ -152,7 +152,7 @@ export function WaitlistForm() {
text={
// @ts-ignore
mutation.error?.message === 'Member Exists'
- ? 'You are already added to the waitlist with this email. We will reach out to you soon.'
+ ? 'You have already subscribed using this email!'
: 'Something went wrong, please try again.'
}
/>
@@ -178,7 +178,7 @@ export function AlertSuccess() {
<Alert variant="success">
<MailCheck className="h-4 w-4" />
<AlertDescription className="pl-7 text-left text-white">
- Thanks for signing up for the waitlist! Consider{' '}
+ Thanks for subscribing! Consider{' '}
<a
className="underline"
href="https://twitter.com/typeheroapp"
@@ -193,7 +193,7 @@ export function AlertSuccess() {
);
}
-async function subscribe(data: WaitlistFormSchema) {
+async function subscribe(data: NewsletterFormSchema) {
const response = await fetch('/api/subscribe', {
method: 'POST',
body: JSON.stringify(data),
diff --git a/apps/web/src/app/[locale]/(email)/waitlist/_components/waitlist.module.css b/apps/web/src/app/[locale]/(email)/newsletter/_components/newsletter.module.css
similarity index 79%
rename from apps/web/src/app/[locale]/(email)/waitlist/_components/waitlist.module.css
rename to apps/web/src/app/[locale]/(email)/newsletter/_components/newsletter.module.css
index f718b7fc..d38e5757 100644
--- a/apps/web/src/app/[locale]/(email)/waitlist/_components/waitlist.module.css
+++ b/apps/web/src/app/[locale]/(email)/newsletter/_components/newsletter.module.css
@@ -1,5 +1,5 @@
-/* The module for the Waitlist page background */
-.waitlistBackground {
+/* The module for the Newsletter page background */
+.newsletterBackground {
top: -56px;
background: linear-gradient(0deg, hsl(var(--background)) 0%, rgba(9, 9, 11, 0) 100%),
linear-gradient(
@@ -17,7 +17,7 @@
}
.mybg {
- background: url('../../../../../assets/images/waitlist-bg.webp');
+ background: url('../../../../../assets/images/newsletter-bg.webp');
background-position-y: 33%;
background-position-x: center;
background-repeat: no-repeat;
diff --git a/apps/web/src/app/[locale]/(email)/waitlist/page.tsx b/apps/web/src/app/[locale]/(email)/newsletter/page.tsx
similarity index 50%
rename from apps/web/src/app/[locale]/(email)/waitlist/page.tsx
rename to apps/web/src/app/[locale]/(email)/newsletter/page.tsx
index 3777eeff..d35f001d 100644
--- a/apps/web/src/app/[locale]/(email)/waitlist/page.tsx
+++ b/apps/web/src/app/[locale]/(email)/newsletter/page.tsx
@@ -3,8 +3,8 @@ import { buildMetaForDefault } from '~/app/metadata';
export async function generateMetadata(): Promise<Metadata> {
return buildMetaForDefault({
- title: 'Waitlist | TypeHero',
- description: 'Join the waitlist for TypeHero and be the first to know when we launch!',
+ title: 'Newsletter | TypeHero',
+ description: 'Subscribe to the TypeHero newsletter and stay informed about our latest updates!',
});
}
-export { Waitlist as default } from './_components';
+export { Newsletter as default } from './_components';
diff --git a/apps/web/src/app/[locale]/_components/hero.tsx b/apps/web/src/app/[locale]/_components/hero.tsx
index 43ba5596..1df5959a 100644
--- a/apps/web/src/app/[locale]/_components/hero.tsx
+++ b/apps/web/src/app/[locale]/_components/hero.tsx
@@ -1,4 +1,4 @@
-import { Github, Mail, Sparkle, Twitter, Compass } from '@repo/ui/icons';
+import { Github, Sparkle, Twitter, Compass } from '@repo/ui/icons';
import Link from 'next/link';
import { Balancer } from 'react-wrap-balancer';
import { Button } from '@repo/ui/components/button';
@@ -183,60 +183,18 @@ export async function Hero() {
<Balancer>{t('description')}</Balancer>
</p>
<div className="flex flex-col-reverse gap-3 md:flex-row">
- {!session && (
- <Button
- asChild
- className="hero-join-button group relative mx-auto w-fit overflow-hidden rounded-xl p-[2px] font-bold transition-all duration-300 hover:bg-transparent hover:shadow-[0_0_2rem_-0.5rem_#3178c6] dark:hidden md:mr-0 lg:mr-auto"
- >
- <Link href="/waitlist">
- <span className="inline-flex h-full w-fit items-center gap-1 rounded-[10px] bg-white px-4 py-2 text-[#3178c6] transition-all duration-300">
- <Mail className="mr-1 h-4 w-4 stroke-[3]" />
- {t('buttons.waitlist')}
- </span>
- </Link>
- </Button>
- )}
- {!session && (
- <Button
- asChild
- className="hero-join-button-dark group relative mx-auto hidden w-fit overflow-hidden rounded-xl p-[1px] font-bold transition-all duration-300 dark:block dark:hover:shadow-[0_0_2rem_-0.5rem_#fff8] md:mr-0 lg:mr-auto"
- >
- <Link href="/waitlist">
- <span className="inline-flex h-full w-fit items-center gap-1 rounded-xl px-4 py-2 transition-all duration-300 dark:bg-neutral-900 dark:text-white group-hover:dark:bg-black">
- <Mail className="mr-1 h-4 w-4 stroke-[3]" />
- {t('buttons.waitlist')}
- </span>
- </Link>
- </Button>
- )}
- {session ? (
- <Button
- asChild
- className="hero-join-button group relative mx-auto w-fit overflow-hidden rounded-xl p-[2px] font-bold transition-all duration-300 hover:bg-transparent hover:shadow-[0_0_2rem_-0.5rem_#3B82F6] dark:hidden md:mr-0 lg:mr-auto"
- variant="outline"
- >
- <Link href="/explore">
- <span className="text-primary inline-flex h-full w-fit items-center gap-2 rounded-[10px] bg-white px-4 py-2 transition-all duration-300">
- <Compass className="h-4 w-4" />
- {t('explore')}
- </span>
- </Link>
- </Button>
- ) : null}
- {session ? (
- <Button
- asChild
- className="hero-join-button-dark group relative mx-auto hidden w-fit overflow-hidden rounded-xl p-[1px] font-bold transition-all duration-300 dark:block dark:hover:shadow-[0_0_2rem_-0.5rem_#fff8] md:mr-0 lg:mr-auto"
- variant="outline"
- >
- <Link href="/explore">
- <span className="inline-flex h-full w-fit items-center gap-2 rounded-xl px-4 py-2 transition-all duration-300 dark:bg-neutral-900 dark:text-white group-hover:dark:bg-black">
- <Compass className="h-4 w-4" />
- {t('explore')}
- </span>
- </Link>
- </Button>
- ) : null}
+ <Button
+ asChild
+ className="hero-join-button-dark group relative mx-auto hidden w-fit overflow-hidden rounded-xl p-[1px] font-bold transition-all duration-300 dark:block dark:hover:shadow-[0_0_2rem_-0.5rem_#fff8] md:mr-0 lg:mr-auto"
+ variant="outline"
+ >
+ <Link href="/explore">
+ <span className="inline-flex h-full w-fit items-center gap-2 rounded-xl px-4 py-2 transition-all duration-300 dark:bg-neutral-900 dark:text-white group-hover:dark:bg-black">
+ <Compass className="h-4 w-4" />
+ {session ? t('explore') : t('start_exploring')}
+ </span>
+ </Link>
+ </Button>
<div className="flex gap-3">
<Button
asChild
diff --git a/apps/web/src/app/[locale]/_components/waitlist-banner.tsx b/apps/web/src/app/[locale]/_components/newsletter-banner.tsx
similarity index 76%
rename from apps/web/src/app/[locale]/_components/waitlist-banner.tsx
rename to apps/web/src/app/[locale]/_components/newsletter-banner.tsx
index d00d1671..61bae9e9 100644
--- a/apps/web/src/app/[locale]/_components/waitlist-banner.tsx
+++ b/apps/web/src/app/[locale]/_components/newsletter-banner.tsx
@@ -2,23 +2,21 @@ import Link from 'next/link';
import { clsx } from 'clsx';
import { Mail } from '@repo/ui/icons';
import { Balancer } from 'react-wrap-balancer';
-import styles from './waitlist.module.css';
+import styles from './newsletter.module.css';
import { Button } from '@repo/ui/components/button';
-export function WaitlistBanner() {
+export function NewsletterBanner() {
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">
<div className="flex flex-col gap-8 px-8 pb-8 pt-48 sm:px-16 sm:pt-20 md:px-0 md:pb-0 md:pt-16">
<h1 className="max-w-[13ch] text-4xl font-bold md:max-w-none">
- <Balancer>Be the First to Know</Balancer>
+ <Balancer>Stay Informed</Balancer>
</h1>
<p className="leading-8 text-black/50 dark:text-white/50">
<Balancer>
- We’re currently working hard to make TypeHero the perfect place for TypeScript
- enthusiasts and learners. If you believe TypeHero can help you become a better
- TypeScript developer in the future, consider joining our waitlist to get updates on
- our progress.
+ Dive into the world of TypeScript excellence! Join us on the journey to becoming a
+ better TypeScript developer.
</Balancer>
</p>
</div>
@@ -26,10 +24,10 @@ export function WaitlistBanner() {
asChild
className="group relative mx-8 w-fit overflow-hidden rounded-xl bg-gradient-to-bl from-indigo-400 via-blue-400 to-emerald-400 p-[2px] font-bold transition-all duration-300 hover:rounded-2xl active:rounded-xl active:duration-150 sm:mx-16 md:mx-auto md:mr-0 md:mt-16 md:-translate-x-[25%] md:scale-[1.5] md:hover:scale-[1.6] md:active:scale-[1.5] lg:mr-auto lg:translate-x-0"
>
- <Link href="/waitlist">
+ <Link href="/newsletter">
<span className="inline-flex h-full w-fit items-center gap-1 rounded-[10px] bg-white/90 px-4 py-2 text-black transition-all duration-300 group-hover:rounded-2xl group-hover:bg-white/0 group-hover:text-white dark:bg-black/80 dark:text-white group-hover:dark:bg-black/0 dark:group-hover:text-black">
<Mail className="mr-1 h-4 w-4 stroke-[3]" />
- Join the Waitlist
+ Subscribe to our newsletter
</span>
</Link>
</Button>
diff --git a/apps/web/src/app/[locale]/_components/waitlist.module.css b/apps/web/src/app/[locale]/_components/newsletter.module.css
similarity index 100%
rename from apps/web/src/app/[locale]/_components/waitlist.module.css
rename to apps/web/src/app/[locale]/_components/newsletter.module.css
diff --git a/apps/web/src/app/[locale]/page.tsx b/apps/web/src/app/[locale]/page.tsx
index a362c1a3..d44e6fde 100644
--- a/apps/web/src/app/[locale]/page.tsx
+++ b/apps/web/src/app/[locale]/page.tsx
@@ -3,7 +3,7 @@ import { Footsies } from '~/components/footsies';
import { Community } from './_components/community/community';
import { Features } from './_components/features';
import { Hero } from './_components/hero';
-import { WaitlistBanner } from './_components/waitlist-banner';
+import { NewsletterBanner } from './_components/newsletter-banner';
import { getStaticParams } from '~/locales/server';
export function generateStaticParams() {
@@ -18,7 +18,7 @@ export default async function Index({ params: { locale } }: { params: { locale:
<Hero />
<Features />
<Community />
- <WaitlistBanner />
+ <NewsletterBanner />
<Footsies />
</>
);
diff --git a/apps/web/src/assets/images/waitlist-bg.webp b/apps/web/src/assets/images/newsletter-bg.webp
similarity index 100%
rename from apps/web/src/assets/images/waitlist-bg.webp
rename to apps/web/src/assets/images/newsletter-bg.webp
diff --git a/apps/web/src/locales/en.ts b/apps/web/src/locales/en.ts
index 7aa9284f..c6dda71d 100644
--- a/apps/web/src/locales/en.ts
+++ b/apps/web/src/locales/en.ts
@@ -2,8 +2,8 @@ export default {
'landing.hero.description':
'Connect, collaborate, and grow with a community of TypeScript developers. Elevate your skills through interactive coding challenges, discussions, and knowledge sharing',
'landing.hero.ghStars': 'Star us on GitHub',
- 'landing.hero.buttons.waitlist': 'Join the waitlist',
'landing.hero.explore': 'Explore',
+ 'landing.hero.start_exploring': 'Start exploring',
'landing.features.badge': 'many features, wow',
'landing.features.title': "What's in TypeHero?",
'landing.features.description': 'All you need to become a TypeScript menace',
diff --git a/apps/web/src/locales/fr.ts b/apps/web/src/locales/fr.ts
index c3463874..ed686b1a 100644
--- a/apps/web/src/locales/fr.ts
+++ b/apps/web/src/locales/fr.ts
@@ -2,8 +2,8 @@ export default {
'landing.hero.description':
'Connectez-vous, collaborez et évoluez avec une communauté de développeurs TypeScript. Améliorez vos compétences grâce à des défis de codage interactifs, des discussions et le partage des connaissances.',
'landing.hero.ghStars': 'Étoile nous sur GitHub',
- 'landing.hero.buttons.waitlist': "S'inscrire sur la liste d'attente",
'landing.hero.explore': 'Explorer',
+ 'landing.hero.start_exploring': 'Commencez à explorer',
'landing.features.badge': 'Nombreuses foncionalité, wow',
'landing.features.title': "Qu'est-ce que TypeHero ?",
'landing.features.description':
diff --git a/packages/email/emails/index.ts b/packages/email/emails/index.ts
index ed66fa1e..6cbf089c 100644
--- a/packages/email/emails/index.ts
+++ b/packages/email/emails/index.ts
@@ -1 +1 @@
-export * from './waitlist-user-signup';
+export * from './newsletter-user-signup';
diff --git a/packages/email/emails/waitlist-user-signup.tsx b/packages/email/emails/newsletter-user-signup.tsx
similarity index 88%
rename from packages/email/emails/waitlist-user-signup.tsx
rename to packages/email/emails/newsletter-user-signup.tsx
index 61bbaa68..8a63e89b 100644
--- a/packages/email/emails/waitlist-user-signup.tsx
+++ b/packages/email/emails/newsletter-user-signup.tsx
@@ -22,7 +22,7 @@ export const UserSignupEmail = (props: { to: string }) => {
return (
<Html>
<Head />
- <Preview>You're on the TypeHero Waitlist!</Preview>
+ <Preview>You've subscribed to the TypeHero newsletter!</Preview>
<Tailwind>
<Body className="mx-auto my-auto bg-white font-sans">
<Container className="mx-auto my-[40px] w-[465px] rounded border border-solid border-[#eaeaea] p-[20px]">
@@ -30,11 +30,11 @@ export const UserSignupEmail = (props: { to: string }) => {
<Img src={`${baseUrl}/typehero.png`} width="64" height="auto" alt="TypeHero" />
</Section>
<Heading className="mx-0 my-[30px] p-0 text-[24px] font-bold text-black">
- You're on the TypeHero Waitlist!
+ You've subscribed to the TypeHero newsletter!
</Heading>
<Text className="pb-2 text-[20px] leading-[24px] text-black">Hey there 👋</Text>
<Text className="text-[14px] leading-[24px] text-black">
- Thank you so much for signing up for the typehero waitlist, we really appreciate it.
+ Thank you so much for subscribing to the TypeHero newsletter, we really appreciate it.
</Text>
<Text className="text-[14px] leading-[24px] text-black">
We are cooking extremely hard to bring you the best experience for doing type
@@ -55,7 +55,7 @@ export const UserSignupEmail = (props: { to: string }) => {
className="text-[14px] leading-[24px] text-black"
href={`${baseUrl}/unsubscribe?email=${props.to}`}
>
- Unsubscribe from the waitlist
+ Unsubscribe from the newsletter
</a>
</Container>
</Container>