From 131d4a3f3d3bee5ff206b63240687826707bd839 Mon Sep 17 00:00:00 2001 From: "Georgi Ganchev @7DIGIT" Date: Mon, 8 Jan 2024 17:03:35 +0200 Subject: [PATCH] Add: GitBook URL to the environment variables --- .env.development | 5 +++-- .env.production | 3 ++- .env.staging | 3 ++- src/blocks/UserProfile/UserProfile.jsx | 8 ++------ 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.env.development b/.env.development index 7b82721f..2f37c929 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,8 @@ -VITE_API_ENDPOINT=https://staging.usupport.online/api +VITE_API_ENDPOINT=http://localhost:3000/api VITE_CMS_API_URL=https://staging.usupport.online/cms/api VITE_AMAZON_S3_BUCKET=https://usupport-staging.s3.eu-central-1.amazonaws.com VITE_WEBSITE_URL=https://staging.usupport.online VITE_SOCKET_IO_URL=wss://staging.usupport.online VITE_STRIPE_PUBLIC_KEY=pk_test_51MPzPVEFe7qoLe5D8bfwXpGuYvL0I98ui3P2lfM1cWoG1b0oRU8GfXBzWnXMrivdRwR7gXXngkjiNxm85PXv4B1400jL8VhSUh -VITE_RECAPTCHA_SITE_KEY=6LeXgo4mAAAAAGZE3yzXq2datUkSUu2ftwTPj27K \ No newline at end of file +VITE_RECAPTCHA_SITE_KEY=6LeXgo4mAAAAAGZE3yzXq2datUkSUu2ftwTPj27K +VITE_GIT_BOOK_URL="https://7digit-1.gitbook.io/usupport/y0yJCW2nZ6Sb52p4arjv" \ No newline at end of file diff --git a/.env.production b/.env.production index a307fabf..930596d8 100644 --- a/.env.production +++ b/.env.production @@ -3,4 +3,5 @@ VITE_API_ENDPOINT= VITE_CMS_API_URL= VITE_AMAZON_S3_BUCKET=https://usupport-production.s3.eu-central-1.amazonaws.com VITE_WEBSITE_URL=https://usupport.online -VITE_STRIPE_PUBLIC_KEY= \ No newline at end of file +VITE_STRIPE_PUBLIC_KEY= +VITE_GIT_BOOK_URL="https://7digit-1.gitbook.io/usupport/y0yJCW2nZ6Sb52p4arjv" \ No newline at end of file diff --git a/.env.staging b/.env.staging index 4d603464..c3088137 100644 --- a/.env.staging +++ b/.env.staging @@ -5,4 +5,5 @@ VITE_AMAZON_S3_BUCKET=https://usupport-staging.s3.eu-central-1.amazonaws.com VITE_WEBSITE_URL=https://staging.usupport.online VITE_SOCKET_IO_URL=wss://staging.usupport.online VITE_STRIPE_PUBLIC_KEY=pk_test_51MPzPVEFe7qoLe5D8bfwXpGuYvL0I98ui3P2lfM1cWoG1b0oRU8GfXBzWnXMrivdRwR7gXXngkjiNxm85PXv4B1400jL8VhSUh -VITE_RECAPTCHA_SITE_KEY=6LeXgo4mAAAAAGZE3yzXq2datUkSUu2ftwTPj27K \ No newline at end of file +VITE_RECAPTCHA_SITE_KEY=6LeXgo4mAAAAAGZE3yzXq2datUkSUu2ftwTPj27K +VITE_GIT_BOOK_URL="https://7digit-1.gitbook.io/usupport/y0yJCW2nZ6Sb52p4arjv" \ No newline at end of file diff --git a/src/blocks/UserProfile/UserProfile.jsx b/src/blocks/UserProfile/UserProfile.jsx index 0fc2e2a6..3f935b22 100644 --- a/src/blocks/UserProfile/UserProfile.jsx +++ b/src/blocks/UserProfile/UserProfile.jsx @@ -12,6 +12,7 @@ import { useGetClientData } from "#hooks"; import "./user-profile.scss"; const AMAZON_S3_BUCKET = `${import.meta.env.VITE_AMAZON_S3_BUCKET}`; +const GIT_BOOK_URL = `${import.meta.env.VITE_GIT_BOOK_URL}`; /** * UserProfile @@ -137,12 +138,7 @@ export const UserProfile = ({ openModal, isTmpUser }) => { label={t("user_guide")} iconName="document" classes="user-profile__grid__item__button" - onClick={() => - window.open( - "https://7digit-1.gitbook.io/usupport/y0yJCW2nZ6Sb52p4arjv", - "_blank" - ) - } + onClick={() => window.open(GIT_BOOK_URL, "_blank")} />