Skip to content

armgit / mapcn

Public Imported from GitHub
0

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

TypeScript

feat: add @mapcn registry alias so install works with add @mapcn

Anmoldeep Singh46c4cf1a4818
diff --git a/src/app/(home)/_components/hero.tsx b/src/app/(home)/_components/hero.tsx
index 8017458..1b44627 100644
--- a/src/app/(home)/_components/hero.tsx
+++ b/src/app/(home)/_components/hero.tsx
@@ -5,8 +5,7 @@ import { Copy, Check, ArrowRight } from "lucide-react";
import Link from "next/link";
import { useState } from "react";
-const siteUrl = process.env.NEXT_PUBLIC_SITE_URL ?? "site-url-here";
-const installCommand = `npx shadcn@latest add ${siteUrl}/r/map.json`;
+const installCommand = "npx shadcn@latest add @mapcn/map";
function CopyButton({ text }: { text: string }) {
const [copied, setCopied] = useState(false);
@@ -58,7 +57,7 @@ export function Hero() {
Built on MapLibre. Styled with Tailwind.
</p>
- <div className="mt-8 animate-fade-up delay-300 w-full max-w-xl">
+ <div className="mt-8 animate-fade-up delay-300 w-full max-w-lg">
<div className="bg-card border border-border rounded-lg shadow-xs overflow-hidden">
<div className="flex items-center gap-1.5 px-3 py-2 border-b border-border/50">
<span className="size-2 rounded-full bg-foreground/20" />
diff --git a/src/app/docs/installation/page.tsx b/src/app/docs/installation/page.tsx
index bc41147..f523a36 100644
--- a/src/app/docs/installation/page.tsx
+++ b/src/app/docs/installation/page.tsx
@@ -10,9 +10,7 @@ import { Metadata } from "next";
import { Card } from "@/components/ui/card";
import { Map, MapControls } from "@/registry/map";
-const siteUrl = process.env.NEXT_PUBLIC_SITE_URL ?? "site-url-here";
-
-const installCode = `npx shadcn@latest add ${siteUrl}/r/map.json`;
+const installCommand = "npx shadcn@latest add @mapcn/map";
const usageCode = `import { Map, MapControls } from "@/components/ui/map";
import { Card } from "@/components/ui/card";
@@ -60,7 +58,7 @@ export default function InstallationPage() {
<DocsSection title="Installation">
<p>Run the following command to add the map component:</p>
- <CodeBlock code={installCode} language="bash" />
+ <CodeBlock code={installCommand} language="bash" />
<p>
This will install <DocsCode>maplibre-gl</DocsCode> and add the map
component to your project.