-
-
Notifications
You must be signed in to change notification settings - Fork 413
/
Copy pathhome.js
72 lines (63 loc) · 2.11 KB
/
home.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import React from 'react';
import { defineMessages, useIntl } from 'react-intl';
import { getRequestIntl } from '../lib/i18n/request';
// import Banner from '../components/collectives/Banner';
import JoinUsSection from '../components/collectives/sections/JoinUs';
import CollaborateWithMoney from '../components/home/CollaborateWithMoneySection';
import DedicatedTeam from '../components/home/DedicatedTeamSection';
import GetToKnowUs from '../components/home/GetToKnowUsSection';
import OpenCollectiveIs from '../components/home/OpenCollectiveIsSection';
import RaiseMoney from '../components/home/RaiseMoneySection';
import TheFutureIsCollective from '../components/home/TheFutureIsCollectiveSection';
import Page from '../components/Page';
const messages = defineMessages({
defaultTitle: {
defaultMessage: 'Raise and spend money with full transparency.',
id: 'TZ9FXt',
},
defaultDescription: {
defaultMessage:
'Open Collective is a legal and financial toolbox for groups. It’s a fundraising + legal status + money management platform for your community. What do you want to do?',
id: 'LrBotK',
},
});
export const HomePage = () => {
const { formatMessage } = useIntl();
return (
<Page
metaTitle={formatMessage(messages.defaultTitle)}
title={formatMessage(messages.defaultTitle)}
description={formatMessage(messages.defaultDescription)}
>
{/*
<Banner />
*/}
<TheFutureIsCollective />
<RaiseMoney />
<OpenCollectiveIs />
<CollaborateWithMoney />
<DedicatedTeam />
<GetToKnowUs />
<JoinUsSection />
</Page>
);
};
// next.js export
// ts-unused-exports:disable-next-line
export const getServerSideProps = async ({ req, res }) => {
if (res && req) {
const { locale } = getRequestIntl(req);
if (locale === 'en') {
res.setHeader('Cache-Control', 'public, s-maxage=3600');
}
}
let skipDataFromTree = false;
// If on server side
if (req) {
skipDataFromTree = true;
}
return { props: { skipDataFromTree } };
};
// next.js export
// ts-unused-exports:disable-next-line
export default HomePage;