@@ -5,7 +5,6 @@ import useSWR from 'swr';
55import { useFetch } from '@gitroom/helpers/utils/custom.fetch' ;
66import { useVariables } from '@gitroom/react/helpers/variable.context' ;
77import { loadStripe , Stripe } from '@stripe/stripe-js' ;
8- import { useSearchParams } from 'next/navigation' ;
98import { OrganizationSelector } from '@gitroom/frontend/components/layout/organization.selector' ;
109import { LanguageComponent } from '@gitroom/frontend/components/layout/language.component' ;
1110import { AttachToFeedbackIcon } from '@gitroom/frontend/components/new-layout/sentry.feedback.component' ;
@@ -24,6 +23,8 @@ import {
2423import { useT } from '@gitroom/react/translation/get.transation.service.client' ;
2524import { useUser } from '@gitroom/frontend/components/layout/user.context' ;
2625import { useDubClickId } from '@gitroom/frontend/components/layout/dubAnalytics' ;
26+ import Image from 'next/image' ;
27+ import { useModals } from '@gitroom/frontend/components/layout/new-modal' ;
2728
2829const ModeComponent = dynamic (
2930 ( ) => import ( '@gitroom/frontend/components/layout/mode.component' ) ,
@@ -50,6 +51,7 @@ export const FirstBillingComponent = () => {
5051 const [ tier , setTier ] = useState ( 'STANDARD' ) ;
5152 const [ period , setPeriod ] = useState ( 'MONTHLY' ) ;
5253 const fetch = useFetch ( ) ;
54+ const modals = useModals ( ) ;
5355 const t = useT ( ) ;
5456
5557 useEffect ( ( ) => {
@@ -69,6 +71,21 @@ export const FirstBillingComponent = () => {
6971 ) . json ( ) ;
7072 } , [ tier , period ] ) ;
7173
74+ const showYouTube = ( ) => {
75+ modals . openModal ( {
76+ title : 'Grow Fast With Postiz (Play the video)' ,
77+ children : (
78+ < iframe
79+ className = "h-full aspect-video min-w-[800px]"
80+ src = "https://www.youtube.com/embed/BdsCVvEYgHU?si=vvhaZJ8I5oXXvVJS?autoplay=1"
81+ title = "Postiz Tutorial"
82+ allow = "autoplay"
83+ allowFullScreen
84+ />
85+ ) ,
86+ } ) ;
87+ } ;
88+
7289 const { data, isLoading } = useSWR (
7390 `/billing-${ tier } -${ period } ` ,
7491 loadCheckout ,
@@ -101,6 +118,21 @@ export const FirstBillingComponent = () => {
101118 ) }
102119 </ div >
103120
121+ < div className = "flex" onClick = { showYouTube } >
122+ < div className = "tablet:mb-[32px] cursor-pointer mt-[32px] flex gap-[10px] items-center underline hover:font-[700]" >
123+ < div >
124+ < Image
125+ className = "text-[12px]"
126+ src = "/icons/platforms/youtube.svg"
127+ width = { 22.5 }
128+ height = { 16 }
129+ alt = "YouTube"
130+ />
131+ </ div >
132+ < div > See the power of Postiz (click here)</ div >
133+ </ div >
134+ </ div >
135+
104136 { ! ! user ?. allowTrial && (
105137 < div className = "flex mt-[32px] mb-[10px] gap-[15px] tablet:mt-[32px] tablet:mb-[32px] text-[16px] font-[500] mobile:flex-col" >
106138 < div className = "flex gap-[8px]" >
0 commit comments