Skip to content

armgit / mapcn

Public Imported from GitHub
0

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

TypeScript

feat(footer): replace byline with social icons and add copyright row

Anmol874e2c9b3629
diff --git a/src/components/footer.tsx b/src/components/footer.tsx
index 7985076..763be9e 100644
--- a/src/components/footer.tsx
+++ b/src/components/footer.tsx
@@ -2,6 +2,37 @@ import Link from "next/link";
import { Logo } from "./logo";
import { cn } from "@/lib/utils";
+function GitHubIcon({ className }: { className?: string }) {
+ return (
+ <svg viewBox="0 0 1024 1024" fill="currentColor" className={className}>
+ <path
+ fillRule="evenodd"
+ clipRule="evenodd"
+ d="M8 0C3.58 0 0 3.58 0 8C0 11.54 2.29 14.53 5.47 15.59C5.87 15.66 6.02 15.42 6.02 15.21C6.02 15.02 6.01 14.39 6.01 13.72C4 14.09 3.48 13.23 3.32 12.78C3.23 12.55 2.84 11.84 2.5 11.65C2.22 11.5 1.82 11.13 2.49 11.12C3.12 11.11 3.57 11.7 3.72 11.94C4.44 13.15 5.59 12.81 6.05 12.6C6.12 12.08 6.33 11.73 6.56 11.53C4.78 11.33 2.92 10.64 2.92 7.58C2.92 6.71 3.23 5.99 3.74 5.43C3.66 5.23 3.38 4.41 3.82 3.31C3.82 3.31 4.49 3.1 6.02 4.13C6.66 3.95 7.34 3.86 8.02 3.86C8.7 3.86 9.38 3.95 10.02 4.13C11.55 3.09 12.22 3.31 12.22 3.31C12.66 4.41 12.38 5.23 12.3 5.43C12.81 5.99 13.12 6.7 13.12 7.58C13.12 10.65 11.25 11.33 9.47 11.53C9.76 11.78 10.01 12.26 10.01 13.01C10.01 14.08 10 14.94 10 15.21C10 15.42 10.15 15.67 10.55 15.59C13.71 14.53 16 11.53 16 8C16 3.58 12.42 0 8 0Z"
+ transform="scale(64)"
+ fill="currentColor"
+ />
+ </svg>
+ );
+}
+
+function XIcon({ className }: { className?: string }) {
+ return (
+ <svg viewBox="0 0 24 24" fill="currentColor" className={className}>
+ <path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" />
+ </svg>
+ );
+}
+
+const socialLinks = [
+ {
+ label: "GitHub",
+ href: "https://github.com/AnmolSaini16/mapcn",
+ icon: GitHubIcon,
+ },
+ { label: "X", href: "https://x.com/anmold_s", icon: XIcon },
+];
+
const footerLinks = {
product: [
{ label: "Documentation", href: "/docs" },
@@ -33,7 +64,7 @@ const footerLinks = {
export function Footer({ className }: { className?: string }) {
return (
- <footer className={cn("bg-muted/30 mt-30 border-t", className)}>
+ <footer className={cn("bg-muted/30 mt-24 border-t md:mt-40", className)}>
<div className="container py-12 md:py-16">
<div className="grid grid-cols-2 gap-8 md:grid-cols-5">
<div className="col-span-2 md:col-span-2">
@@ -42,17 +73,20 @@ export function Footer({ className }: { className?: string }) {
Free & open-source, ready-to-use, customizable map components for
React.
</p>
- <p className="text-muted-foreground mt-3 text-sm">
- Built by{" "}
- <Link
- href="https://x.com/anmol16_"
- target="_blank"
- rel="noopener noreferrer"
- className="text-muted-foreground hover:text-foreground text-sm font-medium transition-colors"
- >
- @anmol
- </Link>
- </p>
+ <div className="mt-4 flex items-center gap-4">
+ {socialLinks.map((social) => (
+ <Link
+ key={social.href}
+ href={social.href}
+ target="_blank"
+ rel="noopener noreferrer"
+ aria-label={social.label}
+ className="text-muted-foreground hover:text-foreground transition-colors"
+ >
+ <social.icon className="size-4" />
+ </Link>
+ ))}
+ </div>
</div>
<div>
@@ -107,6 +141,12 @@ export function Footer({ className }: { className?: string }) {
</ul>
</div>
</div>
+
+ <div className="mt-12 border-t pt-6">
+ <p className="text-muted-foreground text-xs">
+ © {new Date().getFullYear()} mapcn. All rights reserved.
+ </p>
+ </div>
</div>
</footer>
);
diff --git a/src/components/theme-toggle.tsx b/src/components/theme-toggle.tsx
index 02330b0..17677b5 100644
--- a/src/components/theme-toggle.tsx
+++ b/src/components/theme-toggle.tsx
@@ -3,12 +3,6 @@
import { useCallback, useEffect, useState } from "react";
import { useTheme } from "next-themes";
import { Button } from "@/components/ui/button";
-import {
- Tooltip,
- TooltipContent,
- TooltipTrigger,
-} from "@/components/ui/tooltip";
-import { Kbd } from "./ui/kbd";
import { Moon, Sun } from "lucide-react";
import { Skeleton } from "./ui/skeleton";
@@ -30,20 +24,13 @@ export function ThemeToggle() {
}
return (
- <Tooltip>
- <TooltipTrigger asChild>
- <Button
- onClick={toggleTheme}
- variant="ghost"
- aria-label="Toggle theme"
- size="icon-sm"
- >
- {resolvedTheme === "dark" ? <Moon /> : <Sun />}
- </Button>
- </TooltipTrigger>
- <TooltipContent className="flex items-center gap-2 pr-1">
- Toggle Theme <Kbd>T</Kbd>
- </TooltipContent>
- </Tooltip>
+ <Button
+ onClick={toggleTheme}
+ variant="ghost"
+ aria-label="Toggle theme"
+ size="icon-sm"
+ >
+ {resolvedTheme === "dark" ? <Moon /> : <Sun />}
+ </Button>
);
}
diff --git a/src/components/ui/command.tsx b/src/components/ui/command.tsx
index b2b0fcd..e81382e 100644
--- a/src/components/ui/command.tsx
+++ b/src/components/ui/command.tsx
@@ -50,7 +50,7 @@ function CommandDialog({
</DialogHeader>
<DialogContent
className={cn(
- "top-[min(22vh,7.5rem)] translate-y-0 overflow-hidden p-0 sm:max-w-lg",
+ "top-[min(22vh,10rem)] translate-y-0 overflow-hidden p-0",
className,
)}
showCloseButton={showCloseButton}