From e3ea1f26ab4b7d305e64440126f80e7ee3b206b6 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Thu, 22 Aug 2024 06:08:19 +0530 Subject: [PATCH] feat: set width & height --- src/components/molecules/InterpretationLog.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/molecules/InterpretationLog.tsx b/src/components/molecules/InterpretationLog.tsx index ea0492be..f9286d3a 100644 --- a/src/components/molecules/InterpretationLog.tsx +++ b/src/components/molecules/InterpretationLog.tsx @@ -4,6 +4,7 @@ import Typography from '@mui/material/Typography'; import Highlight from 'react-highlight'; import { useCallback, useEffect, useRef, useState } from "react"; import { useSocketStore } from "../../context/socket"; +import { useBrowserDimensionsStore } from "../../context/browserDimensions"; export const InterpretationLog = () => { const [open, setOpen] = useState(false); @@ -11,6 +12,8 @@ export const InterpretationLog = () => { const logEndRef = useRef(null); + const { width } = useBrowserDimensionsStore(); + const toggleDrawer = (newOpen: boolean) => (event: React.KeyboardEvent | React.MouseEvent) => { if ( event.type === 'keydown' && @@ -76,7 +79,7 @@ export const InterpretationLog = () => { onClose={toggleDrawer(false)} onOpen={toggleDrawer(true)} PaperProps={{ - sx: { background: '#19171c', color: 'white', padding: '10px' } + sx: { background: '#19171c', color: 'white', padding: '10px', height: 720, width: width - 10 } }} >