Skip to content

Commit 709d46d

Browse files
committed
ui: landing: moved the demo video to a separate page with the Calendly added in-line.
1 parent 98e47e8 commit 709d46d

File tree

6 files changed

+71
-9
lines changed

6 files changed

+71
-9
lines changed

components/Button.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const Button = (props: ButtonProps) => {
2626
const basicClass = 'inline-flex items-center justify-center relative cursor-pointer align-middle disabled:cursor-default box-border min-w-max py-1 px-4 rounded-md transition-all ';
2727
const variantClasses = {
2828
contained: "bg-secondary text-secondary-foreground disabled:bg-action-inactive disabled:hover:bg-transparent hover:bg-secondary-light ",
29-
outlined: "border-secondary-foreground border-2 rounded hover:bg-muted ",
29+
outlined: "border-secondary-foreground border-2 rounded hover:bg-muted/40 ",
3030
text: "",
3131
}
3232

package-lock.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vibinex-website",
3-
"version": "1.2.18",
3+
"version": "1.2.19",
44
"private": false,
55
"homepage": "https://vibinex.com",
66
"description": "A plugin that works with GitHub, Bitbucket and GitLab to personalize and data-enrich their code review interfaces",

pages/demo.tsx

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
2+
import React, { useEffect, useState } from 'react'
3+
import { useCalendlyEventListener, InlineWidget } from "react-calendly";
4+
import Footer from '../components/Footer'
5+
import Navbar from '../views/Navbar'
6+
import ProductDemo from '../views/Demo'
7+
import type { Session } from 'next-auth';
8+
import { getAndSetAnonymousIdFromLocalStorage } from '../utils/rudderstack_initialize';
9+
import RudderContext from '../components/RudderContext';
10+
import { getAuthUserEmail, getAuthUserId, getAuthUserName } from '../utils/auth';
11+
12+
const Demo = () => {
13+
const [loading, setLoading] = useState(true);
14+
const [session, setSession] = useState<Session | null>(null);
15+
const { rudderEventMethods } = React.useContext(RudderContext);
16+
17+
useEffect(() => {
18+
fetch("/api/auth/session", { cache: "no-store" }).then(async (res) => {
19+
const sessionVal: Session | null = await res.json();
20+
setSession(sessionVal);
21+
}).catch((err) => {
22+
console.error(`[docs] Error in getting session`, err);
23+
}).finally(() => {
24+
setLoading(false);
25+
});
26+
}, [])
27+
28+
React.useEffect(() => {
29+
const anonymousId = getAndSetAnonymousIdFromLocalStorage();
30+
rudderEventMethods?.track(getAuthUserId(session), "docs page", { type: "page", eventStatusFlag: 1, name: getAuthUserName(session) }, anonymousId)
31+
}, [rudderEventMethods, session]);
32+
33+
useCalendlyEventListener({
34+
onProfilePageViewed: () => console.log("onProfilePageViewed"),
35+
onDateAndTimeSelected: () => console.log("onDateAndTimeSelected"),
36+
onEventTypeViewed: () => console.log("onEventTypeViewed"),
37+
onEventScheduled: (e) => console.log(e.data.payload),
38+
});
39+
40+
return (
41+
<div>
42+
<Navbar transparent={false} />
43+
<ProductDemo />
44+
<div className='w-full text-center py-12'>
45+
<h2 className='font-bold text-[2rem]'>Book a <span className='text-[2rem] text-secondary font-bold'>Live Demo</span> with the Founder</h2>
46+
<div className='w-full md:w-2/3 m-auto'>
47+
<InlineWidget
48+
url="https://calendly.com/avikalp-gupta/30min"
49+
pageSettings={{
50+
hideEventTypeDetails: true,
51+
}}
52+
prefill={{
53+
email: getAuthUserEmail(session),
54+
name: getAuthUserName(session),
55+
}}
56+
/>
57+
</div>
58+
</div>
59+
<Footer />
60+
</div>
61+
)
62+
}
63+
64+
export default Demo

pages/index.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import RudderContext from '../components/RudderContext'
1010
import { getAndSetAnonymousIdFromLocalStorage } from '../utils/rudderstack_initialize'
1111
import { useSession } from 'next-auth/react'
1212
import { getAuthUserId, getAuthUserName, getAuthUserEmail } from '../utils/auth'
13-
import ProductDemo from '../views/Demo'
1413
import Customers from '../views/CustomerLogos'
1514
import Testimonials from '../views/Testimonials'
1615
import JoinDiscord from '../views/JoinDiscord'
@@ -34,7 +33,6 @@ export default function Home() {
3433
<Navbar transparent={true} />
3534
<Hero ctaLink={'/u'} />
3635
<Customers />
37-
<ProductDemo />
3836
<Features />
3937
<WhyUs />
4038
<TrustUs />

views/Hero.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ const Hero = (props: { ctaLink: string }) => {
4747
<Button id="cta-btn" variant="contained" href={props.ctaLink} className='text-center w-[45%] p-3 sm:p-4 px-20 rounded-lg font-bold text-[20px] sm:text-[25px]'>
4848
Get Started
4949
</Button>
50-
<Button id="book-demo-btn" variant="outlined" href="https://calendly.com/avikalp-gupta/30min" target="_blank" className='text-center w-[45%] sm:p-4 p-3 px-20 rounded-lg font-bold sm:text-[25px] text-[20px]'>
51-
Book demo
50+
<Button id="book-demo-btn" variant="outlined" href="/demo" className='text-center w-[45%] sm:p-4 p-3 px-20 rounded-lg font-bold sm:text-[25px] text-[20px]'>
51+
Watch Demo
5252
</Button>
5353
</div>
5454
<p className="text-lg sm:text-lg mb-10 text-gray-300" title="100% privacy & data protection">

0 commit comments

Comments
 (0)