From a75f76fd2d2656ec4d50012439a2606bb04c77da Mon Sep 17 00:00:00 2001 From: Akshai Krishna S Date: Sun, 15 Dec 2024 12:46:34 +0530 Subject: [PATCH 1/2] fixed typo --- src/App.tsx | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index a156543ae..912cc1556 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -14,28 +14,28 @@ * limitations under the License. */ -import { useRef, useState } from "react"; -import "./App.scss"; -import { LiveAPIProvider } from "./contexts/LiveAPIContext"; -import SidePanel from "./components/side-panel/SidePanel"; -import { Altair } from "./components/altair/Altair"; -import ControlTray from "./components/control-tray/ControlTray"; -import cn from "classnames"; +import { useRef, useState } from 'react' +import './App.scss' +import { LiveAPIProvider } from './contexts/LiveAPIContext' +import SidePanel from './components/side-panel/SidePanel' +import { Altair } from './components/altair/Altair' +import ControlTray from './components/control-tray/ControlTray' +import cn from 'classnames' -const API_KEY = process.env.REACT_APP_GEMINI_API_KEY as string; -if (typeof API_KEY !== "string") { - throw new Error("set REACT_APP_GEMINI_APIK_KEY in .env"); +const API_KEY = process.env.REACT_APP_GEMINI_API_KEY as string +if (typeof API_KEY !== 'string') { + throw new Error('set REACT_APP_GEMINI_API_KEY in .env') } -const host = "generativelanguage.googleapis.com"; -const uri = `wss://${host}/ws/google.ai.generativelanguage.v1alpha.GenerativeService.BidiGenerateContent`; +const host = 'generativelanguage.googleapis.com' +const uri = `wss://${host}/ws/google.ai.generativelanguage.v1alpha.GenerativeService.BidiGenerateContent` function App() { // this video reference is used for displaying the active stream, whether that is the webcam or screen capture // feel free to style as you see fit - const videoRef = useRef(null); + const videoRef = useRef(null) // either the screen capture, the video or null, if null we hide it - const [videoStream, setVideoStream] = useState(null); + const [videoStream, setVideoStream] = useState(null) return (
@@ -47,7 +47,7 @@ function App() { {/* APP goes here */}
- + {/* put your own buttons here */} - ); + ) } -export default App; +export default App From 1026aca50e035a4e1d8b902b63668ee8d965f3d7 Mon Sep 17 00:00:00 2001 From: Akshai Krishna S Date: Sun, 15 Dec 2024 13:20:31 +0530 Subject: [PATCH 2/2] Remove .env file and update .gitignore to include .env --- .env | 2 -- .gitignore | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 .env diff --git a/.env b/.env deleted file mode 100644 index c1ffb2c11..000000000 --- a/.env +++ /dev/null @@ -1,2 +0,0 @@ -# create your own API KEY at https://aistudio.google.com/apikey -#REACT_APP_GEMINI_API_KEY='' diff --git a/.gitignore b/.gitignore index 4d29575de..f21726c76 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ .env.development.local .env.test.local .env.production.local +.env npm-debug.log* yarn-debug.log*