aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/website/ts/@next/pages/about/jobs.tsx248
-rw-r--r--packages/website/ts/components/onboarding/onboarding_flow.tsx4
-rw-r--r--packages/website/ts/components/ui/animation.tsx42
-rw-r--r--packages/website/ts/components/ui/ease_up_from_bottom_animation.tsx32
-rw-r--r--packages/website/ts/index.tsx2
-rw-r--r--packages/website/ts/utils/configs.ts4
-rw-r--r--yarn.lock8
7 files changed, 189 insertions, 151 deletions
diff --git a/packages/website/ts/@next/pages/about/jobs.tsx b/packages/website/ts/@next/pages/about/jobs.tsx
index e4a9bb1ad..1e9d54609 100644
--- a/packages/website/ts/@next/pages/about/jobs.tsx
+++ b/packages/website/ts/@next/pages/about/jobs.tsx
@@ -3,9 +3,12 @@ import * as React from 'react';
import styled from 'styled-components';
import { AboutPageLayout } from 'ts/@next/components/aboutPageLayout';
-import { Link } from 'ts/@next/components/link';
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';
+
+const OPEN_POSITIONS_HASH = 'positions';
interface PositionProps {
title: string;
@@ -17,118 +20,165 @@ interface PositionItemProps {
position: PositionProps;
}
-const positions: PositionProps[] = [
- {
- title: 'Product Designer',
- location: 'San Francisco, Remote',
- href: '#',
- },
- {
- title: 'Product Designer',
- location: 'San Francisco, Remote',
- href: '#',
- },
- {
- title: 'Product Designer',
- location: 'San Francisco, Remote',
- href: '#',
- },
- {
- title: 'Open Positition',
- location: "We're always interested in talking to talented people. Send us an application if you think you're the right fit.",
- href: '#',
- },
-];
-
-export const NextAboutJobs = () => (
- <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"
- linkUrl="/about/mission"
- >
- <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 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>
-);
-
-export const Position: React.FunctionComponent<PositionItemProps> = (props: PositionItemProps) => {
+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}>{position.title}</a></Heading>
+ <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>
+ <Paragraph isMuted={true} marginBottom="0">
+ {position.location}
+ </Paragraph>
</StyledColumn>
<StyledColumn width="20%">
- <Paragraph marginBottom="0" textAlign="right"><Link href={position.href}>Apply</Link></Paragraph>
+ <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"
+ linkUrl="/about/mission"
+ >
+ <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;
@@ -173,6 +223,6 @@ const PositionWrap = styled(FlexWrap)`
bottom: 0;
left: 0;
height: 1px;
- background-color: #E3E3E3;
+ background-color: #e3e3e3;
}
`;
diff --git a/packages/website/ts/components/onboarding/onboarding_flow.tsx b/packages/website/ts/components/onboarding/onboarding_flow.tsx
index 91d5f2476..ec1b5bc42 100644
--- a/packages/website/ts/components/onboarding/onboarding_flow.tsx
+++ b/packages/website/ts/components/onboarding/onboarding_flow.tsx
@@ -7,8 +7,8 @@ import {
OnboardingTooltip,
TooltipPointerDisplay,
} from 'ts/components/onboarding/onboarding_tooltip';
-import { Animation } from 'ts/components/ui/animation';
import { Container } from 'ts/components/ui/container';
+import { EaseUpFromBottomAnimation } from 'ts/components/ui/ease_up_from_bottom_animation';
import { Overlay } from 'ts/components/ui/overlay';
import { zIndex } from 'ts/style/z_index';
@@ -66,7 +66,7 @@ export class OnboardingFlow extends React.Component<OnboardingFlowProps> {
let onboardingElement = null;
const currentStep = this._getCurrentStep();
if (this.props.isMobile) {
- onboardingElement = <Animation type="easeUpFromBottom">{this._renderOnboardingCard()}</Animation>;
+ onboardingElement = <EaseUpFromBottomAnimation>{this._renderOnboardingCard()}</EaseUpFromBottomAnimation>;
} else if (currentStep.position.type === 'target') {
const { placement, target } = currentStep.position;
onboardingElement = (
diff --git a/packages/website/ts/components/ui/animation.tsx b/packages/website/ts/components/ui/animation.tsx
deleted file mode 100644
index 943e3bf28..000000000
--- a/packages/website/ts/components/ui/animation.tsx
+++ /dev/null
@@ -1,42 +0,0 @@
-import * as React from 'react';
-import { keyframes, styled } from 'ts/style/theme';
-
-export type AnimationType = 'easeUpFromBottom';
-
-export interface AnimationProps {
- type: AnimationType;
-}
-
-const PlainAnimation: React.StatelessComponent<AnimationProps> = props => <div {...props} />;
-
-const appearFromBottomFrames = keyframes`
- from {
- position: fixed;
- bottom: -500px;
- left: 0px;
- right: 0px;
- }
-
- to {
- position: fixed;
- bottom: 0px;
- left: 0px;
- right: 0px;
- }
-`;
-
-const stylesForAnimation: { [K in AnimationType]: string } = {
- // Needed for safari
- easeUpFromBottom: `position: fixed`,
-};
-
-const animations: { [K in AnimationType]: string } = {
- easeUpFromBottom: `${appearFromBottomFrames} 1s ease 0s 1 forwards`,
-};
-
-export const Animation = styled(PlainAnimation)`
- animation: ${props => animations[props.type]};
- ${props => stylesForAnimation[props.type]};
-`;
-
-Animation.displayName = 'Animation';
diff --git a/packages/website/ts/components/ui/ease_up_from_bottom_animation.tsx b/packages/website/ts/components/ui/ease_up_from_bottom_animation.tsx
new file mode 100644
index 000000000..176c9410c
--- /dev/null
+++ b/packages/website/ts/components/ui/ease_up_from_bottom_animation.tsx
@@ -0,0 +1,32 @@
+import * as React from 'react';
+import { css, keyframes, styled } from 'ts/style/theme';
+
+const appearFromBottomFrames = keyframes`
+ from {
+ position: fixed;
+ bottom: -500px;
+ left: 0px;
+ right: 0px;
+ }
+
+ to {
+ position: fixed;
+ bottom: 0px;
+ left: 0px;
+ right: 0px;
+ }
+`;
+
+const stylesForAnimation = css`
+ position: fixed;
+`;
+const animations = css`
+ animation: ${appearFromBottomFrames} 1s ease 0s 1 forwards;
+`;
+
+export const EaseUpFromBottomAnimation = styled.div`
+ ${props => animations};
+ ${props => stylesForAnimation};
+`;
+
+EaseUpFromBottomAnimation.displayName = 'EaseUpFromBottomAnimation';
diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx
index 3e3dced1a..915d28aaa 100644
--- a/packages/website/ts/index.tsx
+++ b/packages/website/ts/index.tsx
@@ -191,7 +191,7 @@ render(
path={`${WebsiteLegacyPaths.Deployer}/:version?`}
component={LazySolCompilerDocumentation}
/>
- <Route path={WebsiteLegacyPaths.Jobs} component={Jobs as any} />
+ <Redirect from={WebsiteLegacyPaths.Jobs} to={WebsitePaths.AboutJobs} />
<Route component={NotFound as any} />
</Switch>
</div>
diff --git a/packages/website/ts/utils/configs.ts b/packages/website/ts/utils/configs.ts
index 7cc854ca0..663f90249 100644
--- a/packages/website/ts/utils/configs.ts
+++ b/packages/website/ts/utils/configs.ts
@@ -5,8 +5,8 @@ const INFURA_API_KEY = 'T5WSC8cautR4KXyYgsRs';
export const configs = {
AMOUNT_DISPLAY_PRECSION: 5,
- BACKEND_BASE_PROD_URL: 'https://website-api.0x.org',
- BACKEND_BASE_STAGING_URL: 'https://staging-website-api.0x.org',
+ BACKEND_BASE_PROD_URL: 'https://website-api.0xproject.com',
+ BACKEND_BASE_STAGING_URL: 'https://staging-website-api.0xproject.com',
BASE_URL,
BITLY_ACCESS_TOKEN: 'ffc4c1a31e5143848fb7c523b39f91b9b213d208',
DEFAULT_DERIVATION_PATH: `44'/60'/0'`,
diff --git a/yarn.lock b/yarn.lock
index 0c851b056..b74d7b7f0 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -9695,7 +9695,6 @@ jss@^9.3.3, jss@^9.7.0:
jump.js@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/jump.js/-/jump.js-1.0.1.tgz#0de2b1631ba9a1c2c6b8572ad277d877e8503600"
- integrity sha1-DeKxYxupocLGuFcq0nfYd+hQNgA=
just-extend@^1.1.27:
version "1.1.27"
@@ -13225,9 +13224,9 @@ react-flickity-component@^3.1.0:
react "^16.3.2"
react-dom "^16.3.2"
-react-headroom@^2.2.4:
- version "2.2.4"
- resolved "https://registry.yarnpkg.com/react-headroom/-/react-headroom-2.2.4.tgz#e931bf5f91d0ea2c2fbf0f156a2b82d7db6cbe3b"
+react-headroom@2.2.2:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/react-headroom/-/react-headroom-2.2.2.tgz#5ddea3bc87cd54be38f6f98c3fde4527e2a5fb0f"
dependencies:
prop-types "^15.5.8"
raf "^3.3.0"
@@ -13371,7 +13370,6 @@ react-scroll@0xproject/react-scroll#pr-330-and-replace-state:
react-scrollable-anchor@^0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/react-scrollable-anchor/-/react-scrollable-anchor-0.6.1.tgz#fd6e78026c744f76414053d06903b82adccb54d9"
- integrity sha1-/W54Amx0T3ZBQFPQaQO4KtzLVNk=
dependencies:
jump.js "1.0.1"
prop-types "^15.5.10"