config centralized

This commit is contained in:
Michael Freno
2026-01-01 02:22:33 -05:00
parent a6417c650f
commit 8e77727148
24 changed files with 519 additions and 143 deletions

View File

@@ -18,6 +18,7 @@ import { DarkModeToggle } from "./DarkModeToggle";
import { SkeletonBox, SkeletonText } from "./SkeletonLoader";
import { env } from "~/env/client";
import { A, useNavigate, useLocation } from "@solidjs/router";
import { BREAKPOINTS } from "~/config";
function formatDomainName(url: string): string {
const domain = url.split("://")[1]?.split(":")[0] ?? url;
@@ -67,7 +68,10 @@ export function RightBarContent() {
const [loading, setLoading] = createSignal(true);
const handleLinkClick = () => {
if (typeof window !== "undefined" && window.innerWidth < 768) {
if (
typeof window !== "undefined" &&
window.innerWidth < BREAKPOINTS.MOBILE
) {
setLeftBarVisible(false);
}
};
@@ -210,7 +214,10 @@ export function LeftBar() {
const [getLostVisible, setGetLostVisible] = createSignal(false);
const handleLinkClick = () => {
if (typeof window !== "undefined" && window.innerWidth < 768) {
if (
typeof window !== "undefined" &&
window.innerWidth < BREAKPOINTS.MOBILE
) {
setLeftBarVisible(false);
}
};
@@ -311,7 +318,7 @@ export function LeftBar() {
if (ref) {
// Focus trap for accessibility on mobile
const handleKeyDown = (e: KeyboardEvent) => {
const isMobile = window.innerWidth < 768;
const isMobile = window.innerWidth < BREAKPOINTS.MOBILE;
if (!isMobile || !leftBarVisible()) return;