-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathindex.tsx
50 lines (44 loc) · 1.48 KB
/
index.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
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout';
import AOS from 'aos';
import React, { useEffect } from 'react';
import QuestionBlocks from '../partials/question-blocks';
import FeaturesZigZag from '../partials/features-zigzag';
import HeroHome from '../partials/hero-home';
import PageIllustration from '../partials/page-illustration';
import { useLocation } from '@docusaurus/router';
import 'aos/dist/aos.css';
import '../css/style.css';
export default function Home(): JSX.Element {
const location = useLocation();
const { siteConfig } = useDocusaurusContext();
useEffect(() => {
AOS.init({
once: true,
disable: 'phone',
duration: 1000,
easing: 'ease-out-sine',
});
});
useEffect(() => {
document.querySelector('html').style.scrollBehavior = 'auto';
window.scroll({ top: 0 });
document.querySelector('html').style.scrollBehavior = '';
}, [location.pathname]);
return (
<Layout description={siteConfig.customFields.description as string}>
<div className="flex flex-col min-h-screen overflow-hidden">
<main className="grow">
{/* Page illustration */}
<div className="relative max-w-6xl mx-auto h-0 pointer-events-none" aria-hidden="true">
<PageIllustration />
</div>
{/* Page sections */}
<HeroHome />
<QuestionBlocks />
<FeaturesZigZag />
</main>
</div>
</Layout>
);
}