chore: lint
This commit is contained in:
@@ -62,19 +62,18 @@ export const IntegrationSettingsModal = ({ isOpen, handleStart, handleClose }: I
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Function to send the selected sheet ID to the backend to update the robot's google_sheet_id
|
// Function to send the selected sheet ID to the backend to update the robot's google_sheet_id
|
||||||
const updateGoogleSheetId = async () => {
|
const updateGoogleSheetId = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await axios.post(
|
const response = await axios.post(
|
||||||
`http://localhost:8080/auth/gsheets/update`,
|
`http://localhost:8080/auth/gsheets/update`,
|
||||||
{ spreadsheetId: settings.spreadsheetId, robotId: recordingId },
|
{ spreadsheetId: settings.spreadsheetId, robotId: recordingId },
|
||||||
{ withCredentials: true }
|
{ withCredentials: true }
|
||||||
);
|
);
|
||||||
console.log('Google Sheet ID updated:', response.data);
|
console.log('Google Sheet ID updated:', response.data);
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error('Error updating Google Sheet ID:', error.response?.data?.message || error.message);
|
console.error('Error updating Google Sheet ID:', error.response?.data?.message || error.message);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Handle spreadsheet selection
|
// Handle spreadsheet selection
|
||||||
const handleSpreadsheetSelect = (e: React.ChangeEvent<HTMLInputElement>) => {
|
const handleSpreadsheetSelect = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
@@ -129,9 +128,9 @@ const updateGoogleSheetId = async () => {
|
|||||||
{/* Show user info and allow spreadsheet selection once authenticated */}
|
{/* Show user info and allow spreadsheet selection once authenticated */}
|
||||||
{userInfo && (
|
{userInfo && (
|
||||||
<>
|
<>
|
||||||
<Typography sx={{ marginBottom: '10px' }}>
|
<Typography sx={{ marginBottom: '10px' }}>
|
||||||
Logged in as: {userInfo.email}
|
Logged in as: {userInfo.email}
|
||||||
</Typography>
|
</Typography>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@@ -158,8 +157,8 @@ const updateGoogleSheetId = async () => {
|
|||||||
</TextField>
|
</TextField>
|
||||||
|
|
||||||
<button onClick={fetchSpreadsheetFiles}>
|
<button onClick={fetchSpreadsheetFiles}>
|
||||||
Fetch Google Spreadsheets
|
Fetch Google Spreadsheets
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{/* Display selected spreadsheet name */}
|
{/* Display selected spreadsheet name */}
|
||||||
{settings.spreadsheetId && (
|
{settings.spreadsheetId && (
|
||||||
|
|||||||
Reference in New Issue
Block a user