chore: complete clean Agent Desk source snapshot

This commit is contained in:
2026-10-16 12:03:16 +00:00
parent 756ae33d05
commit e57610a27c
123 changed files with 37513 additions and 0 deletions

25
web/hooks/use-lg-media.ts Normal file
View File

@@ -0,0 +1,25 @@
"use client";
import { useSyncExternalStore } from "react";
/** Matches Tailwind's default `lg` breakpoint (1024px). */
const LG_MEDIA_QUERY = "(min-width: 1024px)";
function subscribe(onStoreChange: () => void) {
const mq = window.matchMedia(LG_MEDIA_QUERY);
mq.addEventListener("change", onStoreChange);
return () => mq.removeEventListener("change", onStoreChange);
}
function getSnapshot() {
return window.matchMedia(LG_MEDIA_QUERY).matches;
}
function getServerSnapshot() {
return false;
}
/** Client-only true at lg and above. SSR always returns false for mobile-first rendering. */
export function useIsLgUp() {
return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
}