From f1b6d13928abb8f236e3fcac375efc5b5530b8e9 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Tue, 5 Oct 2021 07:55:44 +0200 Subject: [PATCH] Add youtube header on roadmap pages --- components/page-header.tsx | 7 +++++-- pages/[roadmap]/index.tsx | 33 +++++++++++++++++++++++++++++++-- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/components/page-header.tsx b/components/page-header.tsx index cb5cd5396..97a1125bf 100644 --- a/components/page-header.tsx +++ b/components/page-header.tsx @@ -1,18 +1,21 @@ -import { Box, Container, Heading, Text } from '@chakra-ui/react'; +import { Badge, Box, Container, Heading, Link, Text } from '@chakra-ui/react'; import React from 'react'; +import siteConfig from '../content/site.json'; type PageHeaderProps = { title: string; subtitle: string; children?: React.ReactNode; + beforeTitle?: React.ReactNode; }; export function PageHeader(props: PageHeaderProps) { - const { title, subtitle, children } = props; + const { title, subtitle, children, beforeTitle = null } = props; return ( + {beforeTitle} event({ + category: 'Subscription', + action: 'Clicked the YouTube banner', + label: 'YouTube Alert on Roadmap' + })}> + New + Roadmap topics to be covered on our YouTube + Channel + Topic videos being made on YouTube + » + + ); +} + export default function Roadmap(props: RoadmapProps) { const { roadmap } = props; @@ -60,6 +88,7 @@ export default function Roadmap(props: RoadmapProps) { /> } title={roadmap.title} subtitle={roadmap.description} >