Skip to content

Commit 2078654

Browse files
AmirMohammad CheraghaliAmirMohammad Cheraghali
authored andcommitted
fix: move hooks to top level to prevent react error 310
1 parent 7f396b6 commit 2078654

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/components/ContactMap.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export const ContactMap: React.FC<ContactMapProps> = ({
7474
const [proximalThreshold, setProximalThreshold] = useState(8);
7575
const [showGrid, setShowGrid] = useState(true);
7676
const [showIntraChain, setShowIntraChain] = useState(true);
77+
const [showMobileSidebar, setShowMobileSidebar] = useState(false);
7778

7879
const [filters, setFilters] = useState({
7980
all: true,
@@ -471,7 +472,7 @@ export const ContactMap: React.FC<ContactMapProps> = ({
471472
if (!isOpen) return null;
472473

473474

474-
const [showMobileSidebar, setShowMobileSidebar] = useState(false);
475+
475476

476477
return (
477478
<div className="fixed inset-0 z-[60] flex items-center justify-center p-6 bg-black/70 backdrop-blur-sm animate-in fade-in">

0 commit comments

Comments
 (0)