-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathHome.tsx
98 lines (95 loc) · 2.65 KB
/
Home.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
import { Box } from "@mui/material";
import { useWindowSize } from "hooks/useWindowResize";
import type { NextPage } from "next";
import Head from "next/head";
import { EasySteps } from "pages/home/components/EasySteps";
import { EasyStepsFooter } from "pages/home/components/EasyStepsFooter";
import { Features } from "pages/home/components/Features";
import { Hero } from "pages/home/components/Hero";
import { Intro } from "pages/home/components/Intro";
import CommunityForm from "pages/home/components/JoinTheCommunityForm";
import { ReImagineCommute } from "pages/home/components/ReImagineCommute";
import { RibbonsSection } from "pages/home/components/RibbonsSection";
import ReactPlayer from "react-player/lazy";
import { InView } from "react-intersection-observer";
import { useState } from "react";
import { Play } from "assets/svg";
import styles from "./home.module.scss";
import DotWaveLoader from "components/DotWaveLoader";
export const Home: NextPage = () => {
const { width } = useWindowSize();
const [Yplay, setYplay] = useState(false);
return (
<>
<Head>
<title>WalkingPal</title>
<meta
name="description"
content="The world's first walking buddy app of its kind. Get yourself a walking buddy anytime and anywhere in just a few clicks!"
/>
<meta name="keywords" content="home, walking, pal, walkingpal" />
</Head>
<div className={styles.main}>
<Hero />
<Intro />
<Features />
<Box
borderRadius={5}
position="relative"
zIndex={1}
bgcolor="#fff"
overflow="hidden"
>
<InView as="div" onChange={inView => setYplay(inView)}>
<Box
display="flex"
justifyContent="center"
mx="4vw"
my={4}
position="relative"
>
<Box
position="absolute"
top="0"
left="0"
height="100%"
width="100%"
>
<DotWaveLoader />
</Box>
{width && (
<ReactPlayer
width={width < 1200 ? width - 0.08 * width : 1200}
height={width < 1200 ? (width - 0.08 * width) * 0.5625 : 675}
playIcon={<Play />}
style={{ borderRadius: 30, overflow: "hidden", zIndex: 1 }}
url="https://www.youtube.com/watch?v=L73A9fyyQqw"
light
loop
playing={Yplay}
playsinline
controls
/>
)}
</Box>
</InView>
<RibbonsSection />
</Box>
<Box
position="relative"
top={-50}
pb={5}
px="4vw"
pt={10}
bgcolor="#121212"
borderRadius="0 0 50px 50px"
>
<EasySteps />
<EasyStepsFooter />
</Box>
<ReImagineCommute />
{/* <CommunityForm /> */}
</div>
</>
);
};