Fix: Removed unnecessary ref

This commit is contained in:
Daniel
2024-12-22 20:32:30 +01:00
committed by Nicolás Hatcher Andrés
parent 8ba131011e
commit 095002710b
3 changed files with 2 additions and 7 deletions

View File

@@ -114,7 +114,6 @@ function UploadFileDialog(properties: {
style={{ marginRight: 12 }} style={{ marginRight: 12 }}
onClick={handleClose} onClick={handleClose}
title="Close Dialog" title="Close Dialog"
ref={crossRef}
tabIndex={0} tabIndex={0}
> >
<X /> <X />

View File

@@ -1,6 +1,6 @@
import { Dialog, TextField, styled } from "@mui/material"; import { Dialog, TextField, styled } from "@mui/material";
import { Check, X } from "lucide-react"; import { Check, X } from "lucide-react";
import { useRef, useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { theme } from "../../theme"; import { theme } from "../../theme";
@@ -14,7 +14,6 @@ interface SheetRenameDialogProps {
const SheetRenameDialog = (properties: SheetRenameDialogProps) => { const SheetRenameDialog = (properties: SheetRenameDialogProps) => {
const { t } = useTranslation(); const { t } = useTranslation();
const [name, setName] = useState(properties.defaultName); const [name, setName] = useState(properties.defaultName);
const crossRef = useRef<HTMLDivElement>(null);
const handleClose = () => { const handleClose = () => {
properties.onClose(); properties.onClose();
}; };
@@ -25,7 +24,6 @@ const SheetRenameDialog = (properties: SheetRenameDialogProps) => {
<Cross <Cross
onClick={handleClose} onClick={handleClose}
title="Close Dialog" title="Close Dialog"
ref={crossRef}
tabIndex={0} tabIndex={0}
onKeyDown={() => {}} onKeyDown={() => {}}
> >

View File

@@ -1,7 +1,7 @@
import styled from "@emotion/styled"; import styled from "@emotion/styled";
import { Dialog, TextField } from "@mui/material"; import { Dialog, TextField } from "@mui/material";
import { Check, X } from "lucide-react"; import { Check, X } from "lucide-react";
import { useRef, useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { theme } from "../theme"; import { theme } from "../theme";
@@ -17,7 +17,6 @@ type FormatPickerProps = {
const FormatPicker = (properties: FormatPickerProps) => { const FormatPicker = (properties: FormatPickerProps) => {
const { t } = useTranslation(); const { t } = useTranslation();
const [formatCode, setFormatCode] = useState(properties.numFmt); const [formatCode, setFormatCode] = useState(properties.numFmt);
const crossRef = useRef<HTMLDivElement>(null);
const handleClose = () => { const handleClose = () => {
properties.onClose(); properties.onClose();
@@ -40,7 +39,6 @@ const FormatPicker = (properties: FormatPickerProps) => {
<Cross <Cross
onClick={handleClose} onClick={handleClose}
title="Close Dialog" title="Close Dialog"
ref={crossRef}
tabIndex={0} tabIndex={0}
onKeyDown={() => {}} onKeyDown={() => {}}
> >