-
Notifications
You must be signed in to change notification settings - Fork 114
/
index.js
49 lines (43 loc) · 1.54 KB
/
index.js
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
import { useEffect } from 'react';
import AboutPageData from '../../../content/pages/about.json';
import Scroll2Top from '../../../components/scroll2top/scroll2top.js';
import BlockBuilder from '../../../components/blockbuilder/blockbuilder.js';
import { initFloaterAnimations } from '../../../lib/floater-animations.js';
import GeneralPageData from '../../../content/pages/general.json';
// ====================================================================== Exports
export default function Home() {
const sections = AboutPageData.page_content;
const animations = AboutPageData.floater_animations;
useEffect(() => {
let pageFloaters = {};
initFloaterAnimations(animations).then(result => {
pageFloaters = result;
});
return () => {
if (pageFloaters.hasOwnProperty('destroy')) {
pageFloaters.destroy();
}
};
}, [animations]);
return (
<>
<main className="page page-about">
{sections.map((section, index) => (
<BlockBuilder id={`about_section_${index + 1}`} key={`about_section_${index + 1}`} subsections={section} />
))}
</main>
<Scroll2Top />
</>
);
}
export function getStaticProps() {
const crumbs = GeneralPageData.breadcrumbs;
return {
props: {
title: 'Products - web3.storage - Easy-to-use decentralized storage',
description:
'The easiest way to store data on the decentralized web, with data available over the IPFS network and secured in Filecoin deals',
breadcrumbs: [crumbs.index, crumbs.web3storage],
},
};
}