From b8b8581b1433cca6758cd4e11f5de5d5cddfdc97 Mon Sep 17 00:00:00 2001 From: Jomar Montuya <61284357+jomarmontuya@users.noreply.github.com> Date: Tue, 16 Jan 2024 13:39:08 +0800 Subject: [PATCH 1/6] feat: Get Demo Section Lead Sources Fixes (#2310) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit use correct lead source details based on the current url Path --------- Co-authored-by: Gian Espinosa <44116036+glespinosa@users.noreply.github.com> Co-authored-by: Darwin ❤️❤️❤️ <71545960+darwin808@users.noreply.github.com> Co-authored-by: darwin.apolinario --- src/revamp/ui/GetDemoSection/index.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/revamp/ui/GetDemoSection/index.js b/src/revamp/ui/GetDemoSection/index.js index 465a4c1a7..eca10cae9 100644 --- a/src/revamp/ui/GetDemoSection/index.js +++ b/src/revamp/ui/GetDemoSection/index.js @@ -16,6 +16,7 @@ import { MultiFieldForm } from './MultiFieldForm'; import getLastVisitedPathAndUrl from 'revamp/utils/getLastVisitedPathAndUrl'; import { generateAlt } from 'utils'; import useGetDynamicData from './useGetDynamicData'; +import { useRouter } from 'next/router'; const acorns = 'https://storage.googleapis.com/assets.zesty.io/website/images/assets/demo/Acorns%20Logo.svg', @@ -39,6 +40,7 @@ const GetDemoSection = ({ isContact = false, formTitle = 'Enter your details to connect with a Content Expert', }) => { + const router = useRouter(); const { lastVisitedPath, lastVisitedURL } = getLastVisitedPathAndUrl(); const { data } = useGetDynamicData(); let inquiryReasons = [ @@ -50,6 +52,13 @@ const GetDemoSection = ({ 'Press Relations', ]; + const getLeadSourceDetail = () => { + if (router.asPath.includes('contact')) return 'Contact Us'; + if (router.asPath.includes('demo')) return 'Demo Sign Up'; + + return 'Get a Talk to Us'; + }; + const onSubmit = async (values) => { if (values.firstName === '') { values.firstName = 'Unknown'; @@ -60,9 +69,9 @@ const GetDemoSection = ({ let payload = getLeadObjectZOHO( values, values?.inquiryReason, - 'Demo Sign Up', + getLeadSourceDetail(), '', - '', // leadsource + 'Website', // leadsource lastVisitedPath, lastVisitedURL, ); From 0cd6d29d1f5adc1e07ea07106debcbaa08a0253a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Darwin=20=E2=9D=A4=EF=B8=8F=E2=9D=A4=EF=B8=8F=E2=9D=A4?= =?UTF-8?q?=EF=B8=8F?= <71545960+darwin808@users.noreply.github.com> Date: Tue, 16 Jan 2024 15:36:15 +0800 Subject: [PATCH 2/6] chore: version bump (#2312) Co-authored-by: darwin.apolinario --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 07af0a754..4a9e8e75a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "zesty-website", - "version": "1.0.6", + "version": "1.0.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "zesty-website", - "version": "1.0.6", + "version": "1.0.7", "dependencies": { "@codemirror/lang-javascript": "^6.2.1", "@codemirror/view": "^6.21.2", diff --git a/package.json b/package.json index ab5381536..ae836f4f1 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "zesty-website", "author": "Zesty.io Platform Inc.", "email": "marketing@zesty.io", - "version": "1.0.6", + "version": "1.0.7", "private": true, "scripts": { "dev": "NODE_OPTIONS='--inspect' next dev", From fb4f65c26ecef26be8b49f56775b4cce3d0b80fb Mon Sep 17 00:00:00 2001 From: glespinosa Date: Thu, 18 Jan 2024 22:07:51 +0800 Subject: [PATCH 3/6] fix(fix darkmode issues): fix darkmode issues fix darkmode issues --- src/components/console/DocsAppbar.js | 54 +++++-- src/components/globals/TableOfContent.js | 7 +- .../markdown-styling/ZestyMarkdownParser.js | 80 +++++++++ src/views/Docs/DocsPages.js | 153 ++++++++++++++---- 4 files changed, 247 insertions(+), 47 deletions(-) diff --git a/src/components/console/DocsAppbar.js b/src/components/console/DocsAppbar.js index eef408d7b..3ad6b226f 100644 --- a/src/components/console/DocsAppbar.js +++ b/src/components/console/DocsAppbar.js @@ -73,7 +73,9 @@ export const DocsAppbar = React.memo(() => { const instanceZUID = getCookie('ZESTY_WORKING_INSTANCE') || workingInstance; const theme = useTheme(); const isDarkMode = theme.palette.mode === 'dark'; - const isMobile = useMediaQuery(theme.breakpoints.down('sm')); + const isMobile = useMediaQuery(theme.breakpoints.down('md')); + const isLG = useMediaQuery(theme.breakpoints.up('lg')); + const isXL = useMediaQuery(theme.breakpoints.up('xl')); const onChangeDropdown = (data) => { let category = data.label; @@ -138,6 +140,15 @@ export const DocsAppbar = React.memo(() => { const isTour = router.asPath.includes('/tour'); const isGuides = !isApiReference && !isTour; + const showSearchModal = () => { + if (isLoggedIn) { + if (isXL) return true; + } else { + if (isXL) return true; + } + return false; + }; + useEffect(() => { const routeCategory = router.asPath.split('/').filter((e) => e)[1]; setSelectedDocsCategory(docsCategory || routeCategory); @@ -149,7 +160,7 @@ export const DocsAppbar = React.memo(() => { alignItems="center" justifyContent={'space-between'} sx={{ - px: 2, + px: 3, py: 1, alignItems: isMobile ? 'left' : 'center', borderTop: isDarkMode ? ' ' : `1px solid ${grey[200]}`, @@ -157,10 +168,15 @@ export const DocsAppbar = React.memo(() => { background: isDarkMode ? theme.palette.zesty.zestyDarkBlue : 'white', }} > - + @@ -168,7 +184,7 @@ export const DocsAppbar = React.memo(() => { display={'flex'} justifyContent={'center'} justifyItems={'center'} - width={1} + width={'100%'} > {