import React, { useState } from 'react'; import { Link } from 'react-router-dom'; import logo from '../../assets/images/wrenchboard-logo-text.png'; import getConfig from './../../Config/config' function Drawer({ drawer, action }) { var site = getConfig()[0]; const [itemSize, setSize] = useState('0px'); const [item, setItem] = useState('home'); const handler = (e, value) => { e.preventDefault(); const getItems = document.querySelectorAll(`#${value} li`).length; if (getItems > 0) { setSize(`${43 * getItems}px`); setItem(value); } }; return ( <>