From 5253608955e68843bc05281e35e7719864398c1d Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Tue, 17 Sep 2024 23:07:11 +0530 Subject: [PATCH] feat(wip): send credentials + handle write to sheet --- src/pages/MainPage.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pages/MainPage.tsx b/src/pages/MainPage.tsx index 51ceb02c..97eadb4a 100644 --- a/src/pages/MainPage.tsx +++ b/src/pages/MainPage.tsx @@ -5,6 +5,7 @@ import { Recordings } from "../components/organisms/Recordings"; import { Runs } from "../components/organisms/Runs"; import { useGlobalInfoStore } from "../context/globalInfo"; import { createRunForStoredRecording, interpretStoredRecording, notifyAboutAbort, scheduleStoredRecording } from "../api/storage"; +import { handleUploadCredentials, handleWriteToSheet } from "../api/interpretation" import { io, Socket } from "socket.io-client"; import { stopRecording } from "../api/recording"; import { RunSettings } from "../components/molecules/RunSettings"; @@ -114,7 +115,11 @@ export const MainPage = ({ handleEditRecording }: MainPageProps) => { } const handleIntegrateRecording = (settings: IntegrationSettings) => { - console.log(`Integration settings:`, settings); + handleUploadCredentials(settings.credentials).then(() => { + handleWriteToSheet(settings.spreadsheetId, settings.range).then(() => { + notify('success', `Data written to Google Sheet successfully`); + }); + }); } const DisplayContent = () => {