Skip to content

Commit a009890

Browse files
committed
fix(web): uniform auth-aware nav across public pages
Adds a shared (public)/layout.tsx that renders the session-aware MarketingNav + Footer once, so every public page (incl. client pages like feedback) reflects login state — fixing the 'Sign in shown while signed in' bug on feedback and the 404 page. Strips the now-redundant per-page chrome. The immersive /c/[slug] share page moves to a chrome-less (share) group (URL unchanged). Relabels the 'Following' nav item to 'Feed'.
1 parent 4227cf0 commit a009890

16 files changed

Lines changed: 64 additions & 115 deletions

File tree

web/app/(public)/discover/page.tsx

Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import type { Metadata } from "next";
22
import { cookies } from "next/headers";
33
import type { Creator } from "@/lib/types";
44
import { listCreators } from "@/lib/api-client";
5-
import { MarketingNav } from "@/components/marketing-nav";
6-
import { Footer } from "@/components/footer";
75
import { CreatorCard } from "@/components/creator-card";
86

97
export const dynamic = "force-dynamic";
@@ -25,33 +23,29 @@ export default async function DiscoverPage() {
2523
}
2624

2725
return (
28-
<>
29-
<MarketingNav />
30-
<main className="mx-auto max-w-6xl px-4 sm:px-6 pb-24 sm:pb-16">
31-
<section className="pt-12 pb-8 sm:pt-16 sm:pb-10 max-w-2xl">
32-
<p className="text-sm text-accent uppercase tracking-widest font-medium mb-3">Discover</p>
33-
<h1 className="font-serif text-4xl sm:text-5xl leading-[1.05] mb-3">
34-
Find creators you&apos;ll love
35-
</h1>
36-
<p className="text-muted text-lg leading-relaxed">
37-
Browse the people curating on shoplit. Follow your favourites and their newest carts
38-
land in your feed.
39-
</p>
40-
</section>
26+
<div className="mx-auto max-w-6xl px-4 sm:px-6 pb-24 sm:pb-16">
27+
<section className="pt-12 pb-8 sm:pt-16 sm:pb-10 max-w-2xl">
28+
<p className="text-sm text-accent uppercase tracking-widest font-medium mb-3">Discover</p>
29+
<h1 className="font-serif text-4xl sm:text-5xl leading-[1.05] mb-3">
30+
Find creators you&apos;ll love
31+
</h1>
32+
<p className="text-muted text-lg leading-relaxed">
33+
Browse the people curating on shoplit. Follow your favourites and their newest carts
34+
land in your feed.
35+
</p>
36+
</section>
4137

42-
{creators.length === 0 ? (
43-
<p className="text-muted py-16 text-center">
44-
No creators to show yet — check back soon.
45-
</p>
46-
) : (
47-
<div className="grid grid-cols-2 gap-3 sm:gap-5 lg:grid-cols-3">
48-
{creators.map((c) => (
49-
<CreatorCard key={c.handle} creator={c} />
50-
))}
51-
</div>
52-
)}
53-
</main>
54-
<Footer />
55-
</>
38+
{creators.length === 0 ? (
39+
<p className="text-muted py-16 text-center">
40+
No creators to show yet — check back soon.
41+
</p>
42+
) : (
43+
<div className="grid grid-cols-2 gap-3 sm:gap-5 lg:grid-cols-3">
44+
{creators.map((c) => (
45+
<CreatorCard key={c.handle} creator={c} />
46+
))}
47+
</div>
48+
)}
49+
</div>
5650
);
5751
}

web/app/(public)/feedback/page.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
import { useState } from "react";
44
import Link from "next/link";
5-
import { NavBar } from "@/components/nav-bar";
6-
import { Footer } from "@/components/footer";
75
import { submitFeedback } from "@/lib/api-client";
86
import { Lightbulb, ArrowRight } from "lucide-react";
97

@@ -39,10 +37,8 @@ export default function FeedbackPage() {
3937
};
4038

4139
return (
42-
<>
43-
<NavBar variant="marketing" />
44-
<main className="mx-auto max-w-6xl px-4 sm:px-6">
45-
{/* HERO */}
40+
<div className="mx-auto max-w-6xl px-4 sm:px-6">
41+
{/* HERO */}
4642
<section className="pt-16 pb-10 sm:pt-24 sm:pb-14 text-center max-w-2xl mx-auto">
4743
<span
4844
className="inline-grid place-items-center size-12 rounded-2xl text-accent mb-5"
@@ -164,8 +160,6 @@ export default function FeedbackPage() {
164160
)}
165161
</div>
166162
</section>
167-
</main>
168-
<Footer />
169-
</>
163+
</div>
170164
);
171165
}

web/app/(public)/get-extension/page.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import type { Metadata } from "next";
22
import Link from "next/link";
3-
import { MarketingNav } from "@/components/marketing-nav";
4-
import { Footer } from "@/components/footer";
53
import { Puzzle, Monitor, Smartphone } from "lucide-react";
64

75
const STORE_URL = "https://chromewebstore.google.com/detail/shoplit-%E2%80%94-add-to-cart/dplbbiamddaaimhjennfncbpbnkfconn";
@@ -26,10 +24,8 @@ const mobileSteps = [
2624

2725
export default function GetExtensionPage() {
2826
return (
29-
<>
30-
<MarketingNav />
31-
<main className="mx-auto max-w-2xl px-4 sm:px-6 py-16">
32-
<div className="text-center mb-10">
27+
<div className="mx-auto max-w-2xl px-4 sm:px-6 py-16">
28+
<div className="text-center mb-10">
3329
<span
3430
className="inline-grid place-items-center size-14 rounded-2xl text-accent mb-4"
3531
style={{ backgroundColor: "color-mix(in srgb, var(--accent) 12%, transparent)" }}
@@ -117,8 +113,6 @@ export default function GetExtensionPage() {
117113
See the full mobile guide →
118114
</Link>
119115
</p>
120-
</main>
121-
<Footer />
122-
</>
116+
</div>
123117
);
124118
}

web/app/(public)/layout.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { MarketingNav } from "@/components/marketing-nav";
2+
import { Footer } from "@/components/footer";
3+
4+
export default function PublicLayout({ children }: { children: React.ReactNode }) {
5+
return (
6+
<>
7+
<MarketingNav />
8+
<main className="min-h-[calc(100vh-15rem)]">{children}</main>
9+
<Footer />
10+
</>
11+
);
12+
}

web/app/(public)/legal/extension-privacy/page.tsx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
import { MarketingNav } from "@/components/marketing-nav";
2-
import { Footer } from "@/components/footer";
3-
41
export const metadata = { title: "Extension Privacy · shoplit" };
52

63
export default function ExtensionPrivacyPage() {
74
return (
8-
<>
9-
<MarketingNav />
10-
<main className="mx-auto max-w-2xl px-4 sm:px-6 py-16">
11-
<h1 className="font-serif text-4xl mb-2">shoplit browser extension — Privacy</h1>
5+
<div className="mx-auto max-w-2xl px-4 sm:px-6 py-16">
6+
<h1 className="font-serif text-4xl mb-2">shoplit browser extension — Privacy</h1>
127
<p className="text-sm text-muted mb-8">Last updated: 2026-05-24</p>
138

149
<h2 className="font-serif text-2xl mt-8 mb-2">What the extension does</h2>
@@ -63,8 +58,6 @@ export default function ExtensionPrivacyPage() {
6358
<p className="leading-relaxed text-ink">
6459
Questions about this policy: <a href="mailto:mayur.das4@gmail.com" className="text-accent underline underline-offset-2">mayur.das4@gmail.com</a>.
6560
</p>
66-
</main>
67-
<Footer />
68-
</>
61+
</div>
6962
);
7063
}

web/app/(public)/legal/privacy/page.tsx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
import { MarketingNav } from "@/components/marketing-nav";
2-
import { Footer } from "@/components/footer";
3-
41
export const metadata = { title: "Privacy · shoplit" };
52

63
export default function PrivacyPage() {
74
return (
8-
<>
9-
<MarketingNav />
10-
<main className="mx-auto max-w-2xl px-4 sm:px-6 py-16">
11-
<h1 className="font-serif text-4xl mb-2">Privacy</h1>
5+
<div className="mx-auto max-w-2xl px-4 sm:px-6 py-16">
6+
<h1 className="font-serif text-4xl mb-2">Privacy</h1>
127
<p className="text-sm text-muted mb-8">Last updated: 2026-05-23</p>
138

149
<h2 className="font-serif text-2xl mt-8 mb-2">What we collect</h2>
@@ -44,8 +39,6 @@ export default function PrivacyPage() {
4439
<p className="leading-relaxed text-ink">
4540
Questions? Reach us via the GitHub repo&apos;s issue tracker.
4641
</p>
47-
</main>
48-
<Footer />
49-
</>
42+
</div>
5043
);
5144
}

web/app/(public)/legal/terms/page.tsx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
import { MarketingNav } from "@/components/marketing-nav";
2-
import { Footer } from "@/components/footer";
3-
41
export const metadata = { title: "Terms · shoplit" };
52

63
export default function TermsPage() {
74
return (
8-
<>
9-
<MarketingNav />
10-
<main className="mx-auto max-w-2xl px-4 sm:px-6 py-16">
11-
<h1 className="font-serif text-4xl mb-2">Terms</h1>
5+
<div className="mx-auto max-w-2xl px-4 sm:px-6 py-16">
6+
<h1 className="font-serif text-4xl mb-2">Terms</h1>
127
<p className="text-sm text-muted mb-8">Last updated: 2026-05-23</p>
138

149
<h2 className="font-serif text-2xl mt-8 mb-2">Using shoplit</h2>
@@ -51,8 +46,6 @@ export default function TermsPage() {
5146
<p className="leading-relaxed text-ink">
5247
Questions or disputes? Reach us via the GitHub repo&apos;s issue tracker.
5348
</p>
54-
</main>
55-
<Footer />
56-
</>
49+
</div>
5750
);
5851
}

web/app/(public)/mobile/page.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import type { Metadata } from "next";
22
import Link from "next/link";
3-
import { MarketingNav } from "@/components/marketing-nav";
4-
import { Footer } from "@/components/footer";
53
import { Smartphone, Apple, Share2, ImageIcon } from "lucide-react";
64

75
export const metadata: Metadata = {
@@ -25,10 +23,8 @@ const iosSteps = [
2523

2624
export default function MobileGuidePage() {
2725
return (
28-
<>
29-
<MarketingNav />
30-
<main className="mx-auto max-w-2xl px-4 sm:px-6 py-16">
31-
{/* HERO */}
26+
<div className="mx-auto max-w-2xl px-4 sm:px-6 py-16">
27+
{/* HERO */}
3228
<div className="text-center mb-10">
3329
<span
3430
className="inline-grid place-items-center size-14 rounded-2xl text-accent mb-4"
@@ -107,8 +103,6 @@ export default function MobileGuidePage() {
107103
No account yet? Create one free
108104
</Link>
109105
</div>
110-
</main>
111-
<Footer />
112-
</>
106+
</div>
113107
);
114108
}

web/app/(public)/page.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import Link from "next/link";
22
import { ArrowRight, Sparkles } from "lucide-react";
3-
import { MarketingNav } from "@/components/marketing-nav";
4-
import { Footer } from "@/components/footer";
53
import { CartCard } from "@/components/cart-card";
64
import { CartCover } from "@/components/cart-cover";
75
import { RevealOnScroll } from "@/components/reveal-on-scroll";
@@ -21,9 +19,7 @@ export default async function LandingPage() {
2119
}
2220
return (
2321
<>
24-
<MarketingNav />
25-
<main>
26-
{/* HERO — animated gradient background + cascading phone mockups */}
22+
{/* HERO — animated gradient background + cascading phone mockups */}
2723
<section className="relative overflow-hidden">
2824
{/* Soft warm gradient blobs (CSS-animated) behind the hero */}
2925
<div aria-hidden className="absolute inset-0 -z-10 pointer-events-none">
@@ -209,8 +205,6 @@ export default async function LandingPage() {
209205
</p>
210206
</div>
211207
</section>
212-
</main>
213-
<Footer />
214208
</>
215209
);
216210
}

web/app/(public)/roadmap/page.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import type { Metadata } from "next";
22
import Link from "next/link";
3-
import { MarketingNav } from "@/components/marketing-nav";
4-
import { Footer } from "@/components/footer";
53
import { RevealOnScroll } from "@/components/reveal-on-scroll";
64
import {
75
Lock, ImageUp, UsersRound, Search, Rss, Heart, Star,
@@ -61,10 +59,8 @@ const ITEMS: Item[] = [
6159

6260
export default function RoadmapPage() {
6361
return (
64-
<>
65-
<MarketingNav />
66-
<main className="mx-auto max-w-6xl px-4 sm:px-6">
67-
{/* HERO */}
62+
<div className="mx-auto max-w-6xl px-4 sm:px-6">
63+
{/* HERO */}
6864
<section className="pt-16 pb-10 sm:pt-24 sm:pb-14 text-center max-w-2xl mx-auto">
6965
<p className="text-sm text-accent uppercase tracking-widest font-medium mb-3">Roadmap</p>
7066
<h1 className="font-serif text-4xl sm:text-5xl leading-[1.05] mb-4">Where shoplit is headed</h1>
@@ -121,8 +117,6 @@ export default function RoadmapPage() {
121117
</Link>
122118
</div>
123119
</section>
124-
</main>
125-
<Footer />
126-
</>
120+
</div>
127121
);
128122
}

0 commit comments

Comments
 (0)