-
-
Notifications
You must be signed in to change notification settings - Fork 413
/
Copy pathcollectives.js
61 lines (52 loc) · 1.87 KB
/
collectives.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
import React from 'react';
import { defineMessages, useIntl } from 'react-intl';
import { getRequestIntl } from '../lib/i18n/request';
import CreateCollective from '../components/collectives/sections/CreateCollective';
import FeaturesSection from '../components/collectives/sections/Features';
import FiscalHostSection from '../components/collectives/sections/FiscalHost';
import JoinUsSection from '../components/collectives/sections/JoinUs';
import LearnMoreSection from '../components/collectives/sections/LearnMore';
import MakeCommunitySection from '../components/collectives/sections/MakeCommunity';
import OCUsersSection from '../components/collectives/sections/OCUsers';
import WeAreOpenSection from '../components/collectives/sections/WeAreOpen';
import WhatCanYouDoSection from '../components/collectives/sections/WhatCanYouDo';
import Page from '../components/Page';
const messages = defineMessages({
defaultTitle: {
id: 'OC.tagline',
defaultMessage: 'Make your community sustainable. Collect and spend money transparently.',
},
});
const CollectivesPage = () => {
const { formatMessage } = useIntl();
return (
<Page description={formatMessage(messages.defaultTitle)}>
<MakeCommunitySection />
<WhatCanYouDoSection />
<FeaturesSection />
<FiscalHostSection />
<CreateCollective />
<OCUsersSection />
<WeAreOpenSection />
<LearnMoreSection />
<JoinUsSection />
</Page>
);
};
CollectivesPage.getInitialProps = ({ 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 { skipDataFromTree };
};
// next.js export
// ts-unused-exports:disable-next-line
export default CollectivesPage;