From 19a12490a5165cc2dab81cbcc18b32eeec9d52d2 Mon Sep 17 00:00:00 2001 From: Nour Bouzid Date: Tue, 19 Mar 2024 16:50:30 +0100 Subject: [PATCH] remove unnecessary env var from FE --- .github/workflows/pages.yml | 1 - frontend/src/components/Navbar.vue | 4 ++-- frontend/src/settings.ts | 3 --- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index a4597c0a..d30f8881 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -41,7 +41,6 @@ jobs: VITE_FACE_API_ENDPOINT: ${{secrets.VITE_FACE_API_ENDPOINT}} VITE_VISION_API_ENDPOINT: ${{secrets.VITE_VISION_API_ENDPOINT}} VITE_VISION_API_KEY: ${{secrets.VITE_VISION_API_KEY}} - VITE_CHAT_API_KEY: ${{secrets.VITE_CHAT_API_KEY}} VITE_CHAT_API_ENDPOINT: ${{secrets.VITE_CHAT_API_ENDPOINT}} working-directory: frontend diff --git a/frontend/src/components/Navbar.vue b/frontend/src/components/Navbar.vue index 2f609ed8..75242356 100644 --- a/frontend/src/components/Navbar.vue +++ b/frontend/src/components/Navbar.vue @@ -44,7 +44,7 @@ import { faceApiEndpoint, speechApiKey, visionApiKey, - chatApiKey, + chatApiEndpoint, } from "../settings"; @Component @@ -62,7 +62,7 @@ export default class Navbar extends Vue { return visionApiKey !== ""; } get showChatButton(): boolean { - return chatApiKey !== ""; + return chatApiEndpoint !== ""; } } diff --git a/frontend/src/settings.ts b/frontend/src/settings.ts index ae3359e6..a1c71bbb 100644 --- a/frontend/src/settings.ts +++ b/frontend/src/settings.ts @@ -5,8 +5,6 @@ const faceApiEndpoint = import.meta.env.VITE_FACE_API_ENDPOINT || ""; const visionApiKey = import.meta.env.VITE_VISION_API_KEY || ""; const visionApiEndpoint = import.meta.env.VITE_VISION_API_ENDPOINT || ""; const chatApiEndpoint = import.meta.env.VITE_CHAT_API_ENDPOINT || ""; -const chatApiKey = import.meta.env.VITE_CHAT_API_KEY || ""; - export { imageApiUrl, @@ -16,5 +14,4 @@ export { visionApiKey, visionApiEndpoint, chatApiEndpoint, - chatApiKey };