From ca8bbb35a9bdd3348c6be856398e7e23dc98ff67 Mon Sep 17 00:00:00 2001 From: Kyrylo Shmidt Date: Fri, 2 Jun 2023 11:17:49 +0200 Subject: [PATCH] Open Getting started video in default browser --- .../InstallationWizard/FinishStep/index.tsx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/components/InstallationWizard/FinishStep/index.tsx b/src/components/InstallationWizard/FinishStep/index.tsx index bb2211bf6..5ac89bdb1 100644 --- a/src/components/InstallationWizard/FinishStep/index.tsx +++ b/src/components/InstallationWizard/FinishStep/index.tsx @@ -1,4 +1,5 @@ import { DefaultTheme, useTheme } from "styled-components"; +import { actions as globalActions } from "../../common/App"; import { getThemeKind } from "../../common/App/styles"; import { CircleLoader } from "../../common/CircleLoader"; import { BellIcon } from "../../common/icons/BellIcon"; @@ -14,6 +15,8 @@ import { FinishStepProps } from "./types"; const EMAIL_ERROR_MESSAGE = "Enter a valid email"; +const GETTING_STARTED_VIDEO_URL = "https://www.youtube.com/watch?v=jzBEXfCrnlg"; + const getPlayIconColor = (theme: DefaultTheme) => { switch (theme.mode) { case "light": @@ -38,6 +41,15 @@ export const FinishStep = (props: FinishStepProps) => { const theme = useTheme(); const themeKind = getThemeKind(theme); + const handleGettingStartedVideoLinkClick = () => { + window.sendMessageToDigma({ + action: globalActions.OPEN_URL_IN_DEFAULT_BROWSER, + payload: { + url: GETTING_STARTED_VIDEO_URL + } + }); + }; + return ( {props.quickstartURL && ( @@ -108,11 +120,7 @@ export const FinishStep = (props: FinishStepProps) => { We've prepared a short video to show you the ropes on getting started analyzing your code with Digma. - +