fix navbar issue in mobile view

This commit is contained in:
CanbiZ 2025-01-16 14:43:53 +01:00 committed by GitHub
parent 3f9863ebf9
commit f5b78d5dcc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,10 +2,10 @@ import { OperatingSystem } from "@/lib/types";
import { MessagesSquare, Scroll } from "lucide-react"; import { MessagesSquare, Scroll } from "lucide-react";
import { FaDiscord, FaGithub } from "react-icons/fa"; import { FaDiscord, FaGithub } from "react-icons/fa";
const isMobile = typeof window !== "undefined" && window.innerWidth < 640;
export const basePath = process.env.BASE_PATH; export const basePath = process.env.BASE_PATH;
const isMobile = typeof window !== "undefined" && window.innerWidth < 640;
export const navbarLinks = [ export const navbarLinks = [
{ {
href: `https://github.com/community-scripts/${basePath}`, href: `https://github.com/community-scripts/${basePath}`,
@ -25,13 +25,15 @@ export const navbarLinks = [
icon: <Scroll className="h-4 w-4" />, icon: <Scroll className="h-4 w-4" />,
text: "Change Log", text: "Change Log",
}, },
!isMobile && { !isMobile
href: `https://github.com/community-scripts/${basePath}/discussions`, ? {
event: "Discussions", href: `https://github.com/community-scripts/${basePath}/discussions`,
icon: <MessagesSquare className="h-4 w-4" />, event: "Discussions",
text: "Discussions", icon: <MessagesSquare className="h-4 w-4" />,
}, text: "Discussions",
].filter(Boolean); }
: null,
].filter(Boolean);
export const mostPopularScripts = [ export const mostPopularScripts = [
"Proxmox VE Post Install", "Proxmox VE Post Install",