MCPcopy Index your code
hub / github.com/sqlchat/sqlchat / handleWindowResize

Function handleWindowResize

src/components/ConnectionSidebar.tsx:42–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40
41 useEffect(() => {
42 const handleWindowResize = () => {
43 if (window.innerWidth < ResponsiveWidth.sm) {
44 layoutStore.toggleSidebar(false);
45 layoutStore.setIsMobileView(true);
46 } else {
47 layoutStore.toggleSidebar(true);
48 layoutStore.setIsMobileView(false);
49 }
50 };
51
52 handleWindowResize();
53 window.addEventListener("resize", handleWindowResize);

Callers 1

ConnectionSidebarFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected