mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-10 03:39:44 -06:00
add ref to <aside> to track sidebar DOM
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import React, { useEffect, useState, useRef } from "react";
|
||||
import {
|
||||
Box,
|
||||
Collapse,
|
||||
@@ -127,6 +127,8 @@ function Sidebar() {
|
||||
const distributedUptimeEnabled = useSelector(
|
||||
(state) => state.ui.distributedUptimeEnabled
|
||||
);
|
||||
const sidebarRef = useRef(null);
|
||||
|
||||
|
||||
const renderAccountMenuItems = () => {
|
||||
let filteredAccountMenuItems = [...accountMenuItems];
|
||||
@@ -196,6 +198,7 @@ function Sidebar() {
|
||||
return (
|
||||
<Stack
|
||||
component="aside"
|
||||
ref={sidebarRef}
|
||||
className={collapsed ? "collapsed" : "expanded"}
|
||||
/* TODO general padding should be here */
|
||||
py={theme.spacing(6)}
|
||||
|
||||
Reference in New Issue
Block a user