From 095002710ba5a6af9c57a1fb8a67210a6af7528d Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 22 Dec 2024 20:32:30 +0100 Subject: [PATCH] Fix: Removed unnecessary ref --- webapp/src/AppComponents/UploadFileDialog.tsx | 1 - webapp/src/components/SheetTabBar/SheetRenameDialog.tsx | 4 +--- webapp/src/components/formatPicker.tsx | 4 +--- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/webapp/src/AppComponents/UploadFileDialog.tsx b/webapp/src/AppComponents/UploadFileDialog.tsx index c8ec289..18251c6 100644 --- a/webapp/src/AppComponents/UploadFileDialog.tsx +++ b/webapp/src/AppComponents/UploadFileDialog.tsx @@ -114,7 +114,6 @@ function UploadFileDialog(properties: { style={{ marginRight: 12 }} onClick={handleClose} title="Close Dialog" - ref={crossRef} tabIndex={0} > diff --git a/webapp/src/components/SheetTabBar/SheetRenameDialog.tsx b/webapp/src/components/SheetTabBar/SheetRenameDialog.tsx index 03971fb..79326ca 100644 --- a/webapp/src/components/SheetTabBar/SheetRenameDialog.tsx +++ b/webapp/src/components/SheetTabBar/SheetRenameDialog.tsx @@ -1,6 +1,6 @@ import { Dialog, TextField, styled } from "@mui/material"; import { Check, X } from "lucide-react"; -import { useRef, useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { theme } from "../../theme"; @@ -14,7 +14,6 @@ interface SheetRenameDialogProps { const SheetRenameDialog = (properties: SheetRenameDialogProps) => { const { t } = useTranslation(); const [name, setName] = useState(properties.defaultName); - const crossRef = useRef(null); const handleClose = () => { properties.onClose(); }; @@ -25,7 +24,6 @@ const SheetRenameDialog = (properties: SheetRenameDialogProps) => { {}} > diff --git a/webapp/src/components/formatPicker.tsx b/webapp/src/components/formatPicker.tsx index 377114c..cb3402d 100644 --- a/webapp/src/components/formatPicker.tsx +++ b/webapp/src/components/formatPicker.tsx @@ -1,7 +1,7 @@ import styled from "@emotion/styled"; import { Dialog, TextField } from "@mui/material"; import { Check, X } from "lucide-react"; -import { useRef, useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { theme } from "../theme"; @@ -17,7 +17,6 @@ type FormatPickerProps = { const FormatPicker = (properties: FormatPickerProps) => { const { t } = useTranslation(); const [formatCode, setFormatCode] = useState(properties.numFmt); - const crossRef = useRef(null); const handleClose = () => { properties.onClose(); @@ -40,7 +39,6 @@ const FormatPicker = (properties: FormatPickerProps) => { {}} >