|
@@ -2,6 +2,7 @@ import { Github, Mail, Twitter } from "lucide-react";
|
|
|
|
|
|
import { getI18n } from "locales/server";
|
|
|
import { TFunction } from "locales/client";
|
|
|
+import { cn } from "@/shared/lib/utils";
|
|
|
import { Link } from "@/components/ui/link";
|
|
|
|
|
|
const SOCIAL_LINKS = [
|
|
@@ -25,15 +26,15 @@ const SOCIAL_LINKS = [
|
|
|
const NAVIGATION = (t: TFunction) => [
|
|
|
{ name: t("commons.donate"), href: "https://ko-fi.com/workoutcool" },
|
|
|
{ name: t("commons.about"), href: "/about" },
|
|
|
- { name: t("commons.privacy"), href: "/legal/privacy" },
|
|
|
+ { name: t("commons.privacy"), href: "/legal/privacy", hideOnMobile: true },
|
|
|
];
|
|
|
|
|
|
export const Footer = async () => {
|
|
|
const t = await getI18n();
|
|
|
|
|
|
return (
|
|
|
- <footer className="border-t border-base-300 dark:border-gray-800 bg-base-100 dark:bg-black px-2 sm:px-6 py-4 rounded-b-lg">
|
|
|
- <div className="flex flex-col sm:flex-row justify-between items-center gap-4">
|
|
|
+ <footer className="border-t border-base-300 dark:border-gray-800 bg-base-100 dark:bg-black px-4 sm:px-6 py-4 rounded-b-lg">
|
|
|
+ <div className="flex sm:flex-row justify-between items-center gap-4">
|
|
|
{/* Social Icons */}
|
|
|
<div className="flex gap-2">
|
|
|
{SOCIAL_LINKS.map(({ href, icon: Icon, label }) => (
|
|
@@ -52,9 +53,12 @@ export const Footer = async () => {
|
|
|
|
|
|
{/* Navigation Links */}
|
|
|
<div className="flex sm:flex-row gap-2 sm:gap-4 text-center text-gray-700 dark:text-gray-300">
|
|
|
- {NAVIGATION(t).map(({ name, href }) => (
|
|
|
+ {NAVIGATION(t).map(({ name, href, hideOnMobile }) => (
|
|
|
<Link
|
|
|
- className="hover:underline hover:text-blue-500 dark:hover:text-blue-400 text-xs sm:text-sm"
|
|
|
+ className={cn(
|
|
|
+ "hover:underline hover:text-blue-500 dark:hover:text-blue-400 text-xs sm:text-sm",
|
|
|
+ hideOnMobile && "hidden sm:block",
|
|
|
+ )}
|
|
|
href={href}
|
|
|
key={name}
|
|
|
size="sm"
|