Files
sass-mohfarawati/components/layout/floating-admin-button.tsx
T
2026-09-20 20:04:48 +02:00

26 lines
761 B
TypeScript

"use client";
import { ShieldCheck } from "lucide-react";
import { useLocale } from "next-intl";
import { buildAdminUrl } from "@/lib/admin-routing";
import { cn } from "@/lib/utils";
export function FloatingAdminButton() {
const locale = useLocale();
const isRtl = locale === "ar";
return (
<a
href={buildAdminUrl("/")}
aria-label="Admin"
className={cn(
"fixed bottom-5 z-50 flex h-11 w-11 items-center justify-center rounded-full border border-border/70 bg-background/90 text-foreground/70 shadow-lg backdrop-blur-chrome transition-all hover:scale-105 hover:bg-accent hover:text-foreground hover:shadow-xl",
isRtl ? "left-5" : "right-5",
)}
>
<ShieldCheck className="h-5 w-5" />
</a>
);
}