feat: set width & height
This commit is contained in:
@@ -4,6 +4,7 @@ import Typography from '@mui/material/Typography';
|
|||||||
import Highlight from 'react-highlight';
|
import Highlight from 'react-highlight';
|
||||||
import { useCallback, useEffect, useRef, useState } from "react";
|
import { useCallback, useEffect, useRef, useState } from "react";
|
||||||
import { useSocketStore } from "../../context/socket";
|
import { useSocketStore } from "../../context/socket";
|
||||||
|
import { useBrowserDimensionsStore } from "../../context/browserDimensions";
|
||||||
|
|
||||||
export const InterpretationLog = () => {
|
export const InterpretationLog = () => {
|
||||||
const [open, setOpen] = useState<boolean>(false);
|
const [open, setOpen] = useState<boolean>(false);
|
||||||
@@ -11,6 +12,8 @@ export const InterpretationLog = () => {
|
|||||||
|
|
||||||
const logEndRef = useRef<HTMLDivElement | null>(null);
|
const logEndRef = useRef<HTMLDivElement | null>(null);
|
||||||
|
|
||||||
|
const { width } = useBrowserDimensionsStore();
|
||||||
|
|
||||||
const toggleDrawer = (newOpen: boolean) => (event: React.KeyboardEvent | React.MouseEvent) => {
|
const toggleDrawer = (newOpen: boolean) => (event: React.KeyboardEvent | React.MouseEvent) => {
|
||||||
if (
|
if (
|
||||||
event.type === 'keydown' &&
|
event.type === 'keydown' &&
|
||||||
@@ -76,7 +79,7 @@ export const InterpretationLog = () => {
|
|||||||
onClose={toggleDrawer(false)}
|
onClose={toggleDrawer(false)}
|
||||||
onOpen={toggleDrawer(true)}
|
onOpen={toggleDrawer(true)}
|
||||||
PaperProps={{
|
PaperProps={{
|
||||||
sx: { background: '#19171c', color: 'white', padding: '10px' }
|
sx: { background: '#19171c', color: 'white', padding: '10px', height: 720, width: width - 10 }
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography variant="h6" gutterBottom>
|
<Typography variant="h6" gutterBottom>
|
||||||
|
|||||||
Reference in New Issue
Block a user