Skip to content

armgit / mapcn

Public Imported from GitHub
0

Beautiful map components. 100% Free, Zero config, one command setup.

TypeScript

chore(sponsors): quieter empty states on home and docs

Anmol20c40868d5d3
diff --git a/src/app/(main)/(home)/page.tsx b/src/app/(main)/(home)/page.tsx
index e4b23f0..e0d5e20 100644
--- a/src/app/(main)/(home)/page.tsx
+++ b/src/app/(main)/(home)/page.tsx
@@ -14,7 +14,7 @@ import {
} from "@/components/page-header";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
-import { hasFeaturedSponsors, pageviewsSinceLaunch } from "@/lib/sponsors";
+import { hasFeaturedSponsors } from "@/lib/sponsors";
export default function Page() {
const hasSponsors = hasFeaturedSponsors();
@@ -83,7 +83,7 @@ export default function Page() {
</p>
</section>
- {hasSponsors ? (
+ {hasSponsors && (
<section className="container flex flex-col items-center gap-8 pt-20 pb-28 md:pt-24 md:pb-32">
<div className="flex flex-col items-center gap-1.5 text-center">
<h2 className="text-lg font-medium tracking-tight">Backed by</h2>
@@ -100,20 +100,6 @@ export default function Page() {
<ChevronRight className="size-3.5" />
</Link>
</section>
- ) : (
- <section className="container flex flex-col items-center gap-2 py-16 text-center md:py-20">
- <p className="text-muted-foreground text-sm text-balance">
- mapcn is free and open source, kept going by sponsors. Reach the
- developers behind its {pageviewsSinceLaunch} pageviews.
- </p>
- <Link
- href="/sponsors"
- className="text-foreground/80 hover:text-foreground flex items-center gap-1 text-sm font-medium transition-colors"
- >
- Become a sponsor
- <ChevronRight className="size-3.5" />
- </Link>
- </section>
)}
</div>
diff --git a/src/app/(main)/docs/_components/docs.tsx b/src/app/(main)/docs/_components/docs.tsx
index 23c3c77..3e32942 100644
--- a/src/app/(main)/docs/_components/docs.tsx
+++ b/src/app/(main)/docs/_components/docs.tsx
@@ -138,7 +138,7 @@ export function DocsLayout({
<aside className="hidden w-42 shrink-0 xl:block">
<nav className="sticky top-14 -mx-3 max-h-[calc(100svh-3.5rem)] overflow-y-auto px-3 pt-12 pb-10 [scrollbar-gutter:stable]">
{tocItems.length > 0 && <DocsToc items={tocItems} />}
- <DocsSponsors className={tocItems.length > 0 ? "mt-10" : undefined} />
+ <DocsSponsors className={tocItems.length > 0 ? "mt-8" : undefined} />
</nav>
</aside>
</div>
diff --git a/src/components/sponsor-logos.tsx b/src/components/sponsor-logos.tsx
index 566ded3..0689304 100644
--- a/src/components/sponsor-logos.tsx
+++ b/src/components/sponsor-logos.tsx
@@ -1,6 +1,6 @@
import Image from "next/image";
import Link from "next/link";
-import { ArrowRight, ChevronRight } from "lucide-react";
+import { ChevronRight } from "lucide-react";
import { SponsorLink } from "@/components/sponsor-link";
import {
@@ -81,15 +81,12 @@ export function DocsSponsors({ className }: { className?: string }) {
<Link
href="/sponsors"
className={cn(
- "group bg-muted/60 hover:bg-muted dark:bg-muted/30 dark:hover:bg-muted/50 -mx-3 block rounded-xl px-3 py-3 transition-colors",
+ "bg-muted/60 hover:bg-muted dark:bg-muted/30 dark:hover:bg-muted/50 -ml-3 block rounded-xl px-3 py-3 transition-colors",
className,
)}
>
- <span className="flex items-center justify-between gap-2 text-sm font-medium">
- Sponsor mapcn
- <ArrowRight className="text-muted-foreground group-hover:text-foreground size-3.5 transition-[color,translate] group-hover:translate-x-0.5" />
- </span>
- <span className="text-muted-foreground mt-1 block text-xs leading-relaxed">
+ <span className="block text-sm font-medium">Sponsor mapcn</span>
+ <span className="text-muted-foreground mt-1.5 block text-xs leading-relaxed">
Reach developers building with mapcn.
</span>
</Link>