Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions src/components/InstallationWizard/FinishStep/index.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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":
Expand All @@ -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 (
<s.Container>
{props.quickstartURL && (
Expand Down Expand Up @@ -108,11 +120,7 @@ export const FinishStep = (props: FinishStepProps) => {
We&apos;ve prepared a short video to show you the ropes on getting
started analyzing your code with Digma.
</s.SectionDescription>
<Link
href={"https://www.youtube.com/watch?v=jzBEXfCrnlg"}
target={"_blank"}
rel={"noopener noreferrer"}
>
<Link onClick={handleGettingStartedVideoLinkClick}>
<s.IllustrationContainer>
<s.PlayIconContainer>
<s.ThumbnailPlayCircleIcon color={getPlayIconColor(theme)} />
Expand Down