From 7fd6d833890a88f99dfe7750c7e55fce6fa376c7 Mon Sep 17 00:00:00 2001 From: "Georgi Ganchev @7DIGIT" Date: Thu, 4 Jan 2024 13:43:07 +0200 Subject: [PATCH 1/3] Add: user guide buttom to UserProfile --- src/blocks/UserProfile/UserProfile.jsx | 11 +++++++++++ src/blocks/UserProfile/locales/en.json | 3 ++- src/blocks/UserProfile/locales/kk.json | 3 ++- src/blocks/UserProfile/locales/ru.json | 3 ++- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/blocks/UserProfile/UserProfile.jsx b/src/blocks/UserProfile/UserProfile.jsx index 80a5b1f6..0fc2e2a6 100644 --- a/src/blocks/UserProfile/UserProfile.jsx +++ b/src/blocks/UserProfile/UserProfile.jsx @@ -133,6 +133,17 @@ export const UserProfile = ({ openModal, isTmpUser }) => { classes="user-profile__grid__item__button" onClick={() => handleRedirect("/cookie-policy")} /> + + window.open( + "https://7digit-1.gitbook.io/usupport/y0yJCW2nZ6Sb52p4arjv", + "_blank" + ) + } + /> Date: Mon, 8 Jan 2024 17:03:35 +0200 Subject: [PATCH 2/3] 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")} /> Date: Fri, 12 Jan 2024 14:45:00 +0200 Subject: [PATCH 3/3] Refactor: Git Book URL in environment files --- .env.development | 4 ++-- .env.production | 2 +- .env.staging | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.env.development b/.env.development index 2f37c929..1b1577a0 100644 --- a/.env.development +++ b/.env.development @@ -1,8 +1,8 @@ -VITE_API_ENDPOINT=http://localhost:3000/api +VITE_API_ENDPOINT=https://staging.usupport.online/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 -VITE_GIT_BOOK_URL="https://7digit-1.gitbook.io/usupport/y0yJCW2nZ6Sb52p4arjv" \ No newline at end of file +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 930596d8..f915fe96 100644 --- a/.env.production +++ b/.env.production @@ -4,4 +4,4 @@ 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= -VITE_GIT_BOOK_URL="https://7digit-1.gitbook.io/usupport/y0yJCW2nZ6Sb52p4arjv" \ No newline at end of file +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 c3088137..ba75bfc5 100644 --- a/.env.staging +++ b/.env.staging @@ -6,4 +6,4 @@ 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 -VITE_GIT_BOOK_URL="https://7digit-1.gitbook.io/usupport/y0yJCW2nZ6Sb52p4arjv" \ No newline at end of file +VITE_GIT_BOOK_URL=https://7digit-1.gitbook.io/usupport/y0yJCW2nZ6Sb52p4arjv \ No newline at end of file