From 21fcc29df33b78bd68f8fd42aa1ac6bc72a04dff Mon Sep 17 00:00:00 2001 From: spaenleh Date: Mon, 15 Jan 2024 12:26:19 +0100 Subject: [PATCH] fix: use chatbot name --- .github/workflows/deploy-stage.yml | 2 +- src/modules/common/ChatbotPrompt.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-stage.yml b/.github/workflows/deploy-stage.yml index 3678513..9315ed9 100644 --- a/.github/workflows/deploy-stage.yml +++ b/.github/workflows/deploy-stage.yml @@ -36,7 +36,7 @@ jobs: VITE_GRAASP_APP_KEY: ${{ secrets.APP_KEY }} VITE_SENTRY_ENV: staging VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }} - VITE_VERSION: ${{ github.event.client_payload.tag }} + VITE_VERSION: ${{ github.event.client_payload.tag || inputs.tag }} # add any env variable needed by your app here run: yarn build shell: bash diff --git a/src/modules/common/ChatbotPrompt.tsx b/src/modules/common/ChatbotPrompt.tsx index ed35e3d..25238f1 100644 --- a/src/modules/common/ChatbotPrompt.tsx +++ b/src/modules/common/ChatbotPrompt.tsx @@ -141,6 +141,7 @@ const ChatbotPrompt = ({ id }: Props): JSX.Element | null => { {t('CHATBOT_CONFIGURATION_MISSING')} ); } + const chatbotName = chatbotPrompt?.data?.chatbotName || DEFAULT_BOT_USERNAME; // display only if real chatbot prompt does not exist yet if (!realChatbotPromptExists) { @@ -154,7 +155,7 @@ const ChatbotPrompt = ({ id }: Props): JSX.Element | null => { data-cy={buildChatbotPromptContainerDataCy(chatbotPrompt.id)} > } />