aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/@next/pages/about/jobs.tsx
blob: 2fd2c7619cfd0eebc3fb4e700b342154855c8b23 (plain) (blame)
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
import * as _ from 'lodash';
import * as React from 'react';
import DocumentTitle from 'react-document-title';
import styled from 'styled-components';

import { AboutPageLayout } from 'ts/@next/components/aboutPageLayout';
import { Column, FlexWrap, Section } from 'ts/@next/components/newLayout';
import { Heading, Paragraph } from 'ts/@next/components/text';
import { WebsiteBackendJobInfo } from 'ts/types';
import { backendClient } from 'ts/utils/backend_client';
import { constants } from 'ts/utils/constants';

const OPEN_POSITIONS_HASH = 'positions';

interface PositionProps {
    title: string;
    location: string;
    href: string;
}

interface PositionItemProps {
    position: PositionProps;
}

const Position: React.FunctionComponent<PositionItemProps> = (props: PositionItemProps) => {
    const { position } = props;
    return (
        <PositionWrap>
            <StyledColumn width="30%">
                <Heading asElement="h3" size="small" fontWeight="400" marginBottom="0">
                    <a href={position.href} target="_blank">
                        {position.title}
                    </a>
                </Heading>
            </StyledColumn>

            <StyledColumn width="50%" padding="0 40px 0 0">
                <Paragraph isMuted={true} marginBottom="0">
                    {position.location}
                </Paragraph>
            </StyledColumn>

            <StyledColumn width="20%">
                <Paragraph marginBottom="0" textAlign="right">
                    <a href={position.href} target="_blank">
                        Apply
                    </a>
                </Paragraph>
            </StyledColumn>
        </PositionWrap>
    );
};

export interface NextAboutJobsProps {}
interface NextAboutJobsState {
    jobInfos: WebsiteBackendJobInfo[];
}

export class NextAboutJobs extends React.Component<NextAboutJobsProps, NextAboutJobsState> {
    private _isUnmounted: boolean;
    private static _convertJobInfoToPositionProps(jobInfo: WebsiteBackendJobInfo): PositionProps {
        return {
            title: jobInfo.title,
            location: jobInfo.office,
            href: jobInfo.url,
        };
    }
    constructor(props: NextAboutJobsProps) {
        super(props);
        this.state = {
            jobInfos: [],
        };
    }

    public componentWillMount(): void {
        // tslint:disable-next-line:no-floating-promises
        this._fetchJobInfosAsync();
    }
    public componentWillUnmount(): void {
        this._isUnmounted = true;
    }
    public render(): React.ReactNode {
        const positions = this.state.jobInfos.map(jobInfo => NextAboutJobs._convertJobInfoToPositionProps(jobInfo));
        return (
            <AboutPageLayout
                title="Join Us in Our Mission"
                description={
                    <>
                        <Paragraph size="medium">
                            To create a tokenized world where all value can flow freely.
                        </Paragraph>
                        <Paragraph size="medium">
                            We are growing an ecosystem of businesses and projects by solving difficult challenges to
                            make our technology intuitive, flexible, and accessible to all. Join us in building
                            infrastructure upon which the exchange of all assets will take place.
                        </Paragraph>
                    </>
                }
                linkLabel="Our mission and values"
                href={constants.URL_MISSION_AND_VALUES_BLOG_POST}
            >
                <DocumentTitle title="Jobs at 0x" />
                <Section bgColor="#F3F6F4" isFlex={true} maxWidth="1170px" wrapWidth="100%">
                    <Column maxWidth="442px">
                        <Heading size="medium" marginBottom="30px">
                            Powered by a Diverse, Global Community
                        </Heading>

                        <Paragraph>
                            We're a highly technical team with varied backgrounds in engineering, science, business,
                            finance, and research. While the Core Team is headquartered in San Francisco, there are 30+
                            teams building on 0x and hundreds of thousands of participants behind our efforts worldwide.
                            We're passionate about open-source software and decentralized technology's potential to act
                            as an equalizing force in the world.
                        </Paragraph>
                    </Column>

                    <Column maxWidth="600px">
                        <ImageWrap>
                            <img src="/images/@next/jobs/map@2x.png" height="365" alt="Map of community" />
                        </ImageWrap>
                    </Column>
                </Section>

                <Section isFlex={true} maxWidth="1170px" wrapWidth="100%">
                    <Column>
                        <Heading size="medium">Benefits</Heading>
                    </Column>

                    <Column maxWidth="826px">
                        <BenefitsList>
                            <li>Comprehensive Insurance</li>
                            <li>Unlimited Vacation</li>
                            <li>Meals and snacks provided daily</li>
                            <li>Flexible hours and liberal work-from-home-policy</li>
                            <li>Supportive of remote working</li>
                            <li>Transportation, phone, and wellness expense</li>
                            <li>Relocation assistance</li>
                            <li>Optional team excursions</li>
                            <li>Competitive salary</li>
                            <li>Cryptocurrency based compensation</li>
                        </BenefitsList>
                    </Column>
                </Section>

                <Section id={OPEN_POSITIONS_HASH} isFlex={true} maxWidth="1170px" wrapWidth="100%">
                    <Column>
                        <Heading size="medium">
                            Current<br />Openings
                        </Heading>
                    </Column>

                    <Column maxWidth="826px">
                        {_.map(positions, (position, index) => (
                            <Position key={`position-${index}`} position={position} />
                        ))}
                    </Column>
                </Section>
            </AboutPageLayout>
        );
    }
    private async _fetchJobInfosAsync(): Promise<void> {
        try {
            if (!this._isUnmounted) {
                this.setState({
                    jobInfos: [],
                });
            }
            const jobInfos = await backendClient.getJobInfosAsync();
            if (!this._isUnmounted) {
                this.setState({
                    jobInfos,
                });
            }
        } catch (error) {
            if (!this._isUnmounted) {
                this.setState({
                    jobInfos: [],
                });
            }
        }
    }
}

const BenefitsList = styled.ul`
    color: #000;
    font-weight: 300;
    line-height: 1.444444444;
    list-style: disc;
    columns: auto 2;
    column-gap: 80px;

    li {
        margin-bottom: 1em;
    }
`;

const ImageWrap = styled.figure`
    @media (min-width: 768px) {
        height: 600px;
        padding-left: 60px;
        display: flex;
        align-items: flex-end;
    }
`;

const StyledColumn = styled(Column)`
    flex-shrink: 0;

    @media (max-width: 768px) {
        & + & {
            margin-top: 15px;
        }
    }
`;

const PositionWrap = styled(FlexWrap)`
    margin-bottom: 40px;
    padding-bottom: 30px;
    position: relative;

    &:after {
        content: '';
        width: 100%;
        position: absolute;
        bottom: 0;
        left: 0;
        height: 1px;
        background-color: #e3e3e3;
    }
`;