Skip to content

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

fix: aot landing on mobile (#1200)

Eric Lee3ea46bd97c99
diff --git a/apps/web/src/app/[locale]/aot-2023/_components/about.tsx b/apps/web/src/app/[locale]/aot-2023/_components/about.tsx
index e8714f62..409523ae 100644
--- a/apps/web/src/app/[locale]/aot-2023/_components/about.tsx
+++ b/apps/web/src/app/[locale]/aot-2023/_components/about.tsx
@@ -1,5 +1,6 @@
'use client';
+import { cn } from '@repo/ui/cn';
import { Button } from '@repo/ui/components/button';
import {
Sheet,
@@ -10,13 +11,16 @@ import {
} from '@repo/ui/components/sheet';
import { BadgeInfo } from '@repo/ui/icons';
-export function About() {
+export function About({ className }: { className?: string }) {
return (
<Sheet>
<SheetTrigger asChild>
<Button
asChild
- className="flex cursor-pointer items-center gap-2 rounded-xl border-2 px-4 py-2 dark:text-white"
+ className={cn(
+ className,
+ 'flex cursor-pointer items-center gap-2 rounded-xl border-2 px-4 py-2 dark:text-white',
+ )}
variant="outline"
>
<span>
diff --git a/apps/web/src/app/[locale]/aot-2023/_components/index.tsx b/apps/web/src/app/[locale]/aot-2023/_components/index.tsx
index 0c1452bd..7cb37dc8 100644
--- a/apps/web/src/app/[locale]/aot-2023/_components/index.tsx
+++ b/apps/web/src/app/[locale]/aot-2023/_components/index.tsx
@@ -12,7 +12,7 @@ export async function AotLandingPage() {
return (
<div className="flex flex-col gap-5 pb-8 md:gap-10 md:py-5">
<div className="container">
- <h1 className="mb-10 text-center text-4xl font-bold tracking-tighter text-black dark:text-white sm:text-8xl">
+ <h1 className="mb-10 mt-16 text-center text-4xl font-bold tracking-tighter text-black dark:text-white sm:text-8xl">
<span>Advent</span> of <span className="text-red-600">TypeScript</span>
</h1>
<div className="flex flex-col items-center justify-center gap-5">
@@ -20,12 +20,12 @@ export async function AotLandingPage() {
The first type challenge will unlock at{' '}
<span className="text-primary">midnight(est)</span> on December 1st
</p>
- <div className="flex items-center justify-center gap-5">
+ <div className="flex w-full flex-col items-center justify-center gap-2 md:w-auto md:flex-row md:gap-5">
<a
target="_blank"
rel="noreferrer"
href="https://discord.com/invite/KPNUNQRB"
- className="group mx-auto flex items-center gap-2 rounded-xl bg-[#5865F2] px-3 py-2 text-sm font-bold text-white duration-300 dark:bg-[#5865F2]"
+ className="group flex w-full items-center justify-center gap-2 rounded-xl bg-[#5865F2] px-3 py-2 text-sm font-bold text-white duration-300 dark:bg-[#5865F2] md:mx-auto md:w-auto"
>
<svg
className="h-4 w-4 fill-current group-hover:rotate-[360deg]"
@@ -39,10 +39,10 @@ export async function AotLandingPage() {
</svg>
Join the Discord
</a>
- <About />
+ <About className="w-full md:w-auto" />
<Button
asChild
- className="flex items-center gap-2 rounded-xl border-2 px-4 py-2 dark:text-white"
+ className="flex w-full items-center justify-center gap-2 rounded-xl border-2 px-4 py-2 dark:text-white md:w-auto"
variant="outline"
>
<a