38 lines
916 B
TypeScript
38 lines
916 B
TypeScript
// ./components/footer.tsx
|
|
"use client";
|
|
|
|
import Link from "next/link";
|
|
import Image from "next/image";
|
|
import { usePathname } from "next/navigation";
|
|
|
|
const StatusBadge = () => (
|
|
<Image
|
|
src="https://uptime.steffenillium.de/api/badge/2/status"
|
|
alt="System Status"
|
|
width={88} // Add the width of the badge image
|
|
height={20} // Add the height of the badge image
|
|
className="rounded-md shadow-sm" // Optional: for styling consistency
|
|
unoptimized
|
|
/>
|
|
);
|
|
|
|
export function Footer() {
|
|
const pathname = usePathname();
|
|
|
|
if (pathname !== "/connect") return;
|
|
|
|
return (
|
|
|
|
<div className="hidden md:block fixed bottom-4 right-4 z-50">
|
|
<Link
|
|
href="/status"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
className="transition-opacity hover:opacity-80"
|
|
aria-label="View system status page"
|
|
>
|
|
<StatusBadge />
|
|
</Link>
|
|
</div>
|
|
);
|
|
} |