From d172a97247f133a5340c5df263fe0f23019db956 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Wed, 13 Jun 2018 12:29:36 -0700 Subject: Add back redirector behind feature flag --- packages/website/ts/components/redirector.tsx | 9 +++++++++ packages/website/ts/index.tsx | 8 +++++++- packages/website/ts/utils/utils.ts | 3 +++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 packages/website/ts/components/redirector.tsx (limited to 'packages/website/ts') diff --git a/packages/website/ts/components/redirector.tsx b/packages/website/ts/components/redirector.tsx new file mode 100644 index 000000000..a02693003 --- /dev/null +++ b/packages/website/ts/components/redirector.tsx @@ -0,0 +1,9 @@ +import { constants } from 'ts/utils/constants'; + +interface RedirectorProps { + location: string; +} + +export function Redirector(_props: RedirectorProps): void { + window.location.href = constants.URL_ANGELLIST; +} diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx index 5501f5972..249b4fdc9 100644 --- a/packages/website/ts/index.tsx +++ b/packages/website/ts/index.tsx @@ -4,6 +4,7 @@ import { render } from 'react-dom'; import { Provider } from 'react-redux'; import { BrowserRouter as Router, Redirect, Route, Switch } from 'react-router-dom'; import * as injectTapEventPlugin from 'react-tap-event-plugin'; +import { Redirector } from 'ts/components/redirector'; import { About } from 'ts/containers/about'; import { FAQ } from 'ts/containers/faq'; import { Jobs } from 'ts/containers/jobs'; @@ -86,7 +87,12 @@ render( - + {/* TODO: Remove this once we ship the jobs page*/} + {utils.shouldShowJobsPage() ? ( + + ) : ( + + )} diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts index 651a4212a..eb384fbb4 100644 --- a/packages/website/ts/utils/utils.ts +++ b/packages/website/ts/utils/utils.ts @@ -318,6 +318,9 @@ export const utils = { shouldShowPortalV2(): boolean { return this.isDevelopment() || this.isStaging() || this.isDogfood(); }, + shouldShowJobsPage(): boolean { + return this.isDevelopment() || this.isStaging() || this.isDogfood(); + }, getEthToken(tokenByAddress: TokenByAddress): Token { const tokens = _.values(tokenByAddress); const etherToken = _.find(tokens, { symbol: constants.ETHER_TOKEN_SYMBOL }); -- cgit v1.2.3