From 74b2e5935182763dd1c054a32c0a278349dfb98c Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Tue, 17 Sep 2024 20:16:50 +0530 Subject: [PATCH] refactor: variable names --- src/components/molecules/IntegrationSettings.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/molecules/IntegrationSettings.tsx b/src/components/molecules/IntegrationSettings.tsx index 7e118e68..f744fff8 100644 --- a/src/components/molecules/IntegrationSettings.tsx +++ b/src/components/molecules/IntegrationSettings.tsx @@ -4,29 +4,29 @@ import { MenuItem, TextField, Typography } from "@mui/material"; import Button from "@mui/material/Button"; import { modalStyle } from "./AddWhereCondModal"; -interface GoogleSheetsIntegrationProps { +interface IntegrationProps { isOpen: boolean; - handleSubmit: (data: GoogleSheetsSettings) => void; + handleSubmit: (data: IntegrationSettings) => void; handleClose: () => void; } -export interface GoogleSheetsSettings { +export interface IntegrationSettings { credentials: string; spreadsheetId: string; range: string; data: string; } -export const GoogleSheetsIntegrationModal = ({ isOpen, handleSubmit, handleClose }: GoogleSheetsIntegrationProps) => { +export const IntegrationModal = ({ isOpen, handleSubmit, handleClose }: IntegrationProps) => { - const [settings, setSettings] = useState({ + const [settings, setSettings] = useState({ credentials: '', spreadsheetId: '', range: '', data: '', }); - const handleChange = (field: keyof GoogleSheetsSettings) => (e: React.ChangeEvent) => { + const handleChange = (field: keyof IntegrationSettings) => (e: React.ChangeEvent) => { setSettings({ ...settings, [field]: e.target.value }); };