From e6045b532b459c184bb836761bd69490376d19d1 Mon Sep 17 00:00:00 2001 From: Jared Pereira Date: Thu, 21 May 2026 01:56:41 -0400 Subject: [PATCH] render about page at / for unauthed --- app/(home-pages)/page.tsx | 10 ++++++- app/about/AboutPage.tsx | 55 +++++++++++++++++++++++++++++++++++++++ app/about/LandingCTA.tsx | 36 +++++++++++++++++-------- app/about/page.tsx | 54 ++------------------------------------ 4 files changed, 91 insertions(+), 64 deletions(-) create mode 100644 app/about/AboutPage.tsx diff --git a/app/(home-pages)/page.tsx b/app/(home-pages)/page.tsx index 5b1539da..1922786b 100644 --- a/app/(home-pages)/page.tsx +++ b/app/(home-pages)/page.tsx @@ -1,12 +1,20 @@ +import type { Metadata } from "next"; import { cookies } from "next/headers"; import { redirect } from "next/navigation"; +import { AboutPage } from "../about/AboutPage"; + +export const metadata: Metadata = { + title: "Leaflet — social publishing on the Atmosphere", + description: + "A simple and powerful platform for social publishing — blogs, newsletters, and more!", +}; export default async function RootPage() { const cookieStore = await cookies(); const hasAuth = cookieStore.has("auth_token") || cookieStore.has("external_auth_token"); - if (!hasAuth) redirect("/reader"); + if (!hasAuth) return ; const navState = cookieStore.get("nav-state")?.value; if (navState === "reader") redirect("/reader"); diff --git a/app/about/AboutPage.tsx b/app/about/AboutPage.tsx new file mode 100644 index 00000000..5637933e --- /dev/null +++ b/app/about/AboutPage.tsx @@ -0,0 +1,55 @@ +import "./about.css"; +import { IBM_Plex_Serif } from "next/font/google"; +import { LandingCTA, LandingCTABottom } from "./LandingCTA"; +import { Demo } from "./Demo"; +import { Features } from "./Features"; +import { Examples } from "./Examples"; +import { Pricing } from "./Pricing"; +import { Footer } from "./Footer"; + +const ibmPlexSerif = IBM_Plex_Serif({ + subsets: ["latin"], + weight: ["600", "700"], + style: ["normal", "italic"], + display: "swap", + variable: "--font-ibm-plex-serif", +}); + +export function AboutPage() { + return ( +
+
+
+

+ Leaflet +

+ + + +
+ +

+ A simple and powerful platform for social publishing
— blogs, + newsletters, and more! +

+ + + + + +
+
+ ); +} diff --git a/app/about/LandingCTA.tsx b/app/about/LandingCTA.tsx index 51fc248f..c6df80ef 100644 --- a/app/about/LandingCTA.tsx +++ b/app/about/LandingCTA.tsx @@ -4,22 +4,36 @@ import { useState } from "react"; import { LoginModal } from "components/LoginButton"; import { ButtonPrimary, ButtonSecondary } from "components/Buttons"; import { Input } from "components/Input"; +import { useIdentityData } from "components/IdentityProvider"; export function LandingCTA() { let [loginOpen, setLoginOpen] = useState(false); + let { identity } = useIdentityData(); + let signedIn = !!identity?.atp_did; return (
- - + {signedIn ? ( + + Log in + + ) : ( + <> + + + + )} Start Writing diff --git a/app/about/page.tsx b/app/about/page.tsx index 6a9798c5..fb74a6d9 100644 --- a/app/about/page.tsx +++ b/app/about/page.tsx @@ -1,19 +1,4 @@ -import "./about.css"; -import { IBM_Plex_Serif } from "next/font/google"; -import { LandingCTA, LandingCTABottom } from "./LandingCTA"; -import { Demo } from "./Demo"; -import { Features } from "./Features"; -import { Examples } from "./Examples"; -import { Pricing } from "./Pricing"; -import { Footer } from "./Footer"; - -const ibmPlexSerif = IBM_Plex_Serif({ - subsets: ["latin"], - weight: ["600", "700"], - style: ["normal", "italic"], - display: "swap", - variable: "--font-ibm-plex-serif", -}); +import { AboutPage } from "./AboutPage"; export const metadata = { title: "Leaflet — social publishing on the Atmosphere", @@ -22,40 +7,5 @@ export const metadata = { }; export default async function About() { - return ( -
-
-
-

- Leaflet -

- - - -
- -

- A simple and powerful platform for social publishing
— blogs, - newsletters, and more! -

- - - - - -
-
- ); + return ; } -- 2.51.2