diff options
author | Fabio Berger <me@fabioberger.com> | 2018-06-14 17:17:58 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-06-14 17:17:58 +0800 |
commit | f9410d5d008ce289d075741710c6f7705bd3ad2a (patch) | |
tree | e2ca5fe2601ae1958f9ed6555b60fe8f1a20678a /packages/website/ts/utils | |
parent | c232a32991725f2f05d61c40f1fb899d138544d2 (diff) | |
parent | 0e354e5ea1f9951088331a310999bf87c8f8f4b3 (diff) | |
download | dexon-sol-tools-f9410d5d008ce289d075741710c6f7705bd3ad2a.tar dexon-sol-tools-f9410d5d008ce289d075741710c6f7705bd3ad2a.tar.gz dexon-sol-tools-f9410d5d008ce289d075741710c6f7705bd3ad2a.tar.bz2 dexon-sol-tools-f9410d5d008ce289d075741710c6f7705bd3ad2a.tar.lz dexon-sol-tools-f9410d5d008ce289d075741710c6f7705bd3ad2a.tar.xz dexon-sol-tools-f9410d5d008ce289d075741710c6f7705bd3ad2a.tar.zst dexon-sol-tools-f9410d5d008ce289d075741710c6f7705bd3ad2a.zip |
Merge branch 'v2-prototype' into feature/combinatorial-testing
* v2-prototype: (27 commits)
Add back redirector behind feature flag
Update minHeight in Text
Use Text components in Values
Use spread operator instead of React.createElement
Fix issue with positions hash
Revert localhost config
Use Text in Teams
Use Text in OpenPositions
Use Text component for HeaderItem
Remove FloatingImage
Move FilledImage into components/ui
Replace FlatButton with Button in Retry
Fix incorrect colors
Add font family to Button component and use in Join0x component
Consolidate jobs page grey colors with shared colors
Fix lint errors
Remove extra packages
Implement small open positions
Implement large screen open positions
Teams section
...
Diffstat (limited to 'packages/website/ts/utils')
-rw-r--r-- | packages/website/ts/utils/backend_client.ts | 13 | ||||
-rw-r--r-- | packages/website/ts/utils/utils.ts | 3 |
2 files changed, 15 insertions, 1 deletions
diff --git a/packages/website/ts/utils/backend_client.ts b/packages/website/ts/utils/backend_client.ts index 6b16aea6b..835a6ef4d 100644 --- a/packages/website/ts/utils/backend_client.ts +++ b/packages/website/ts/utils/backend_client.ts @@ -1,10 +1,17 @@ import * as _ from 'lodash'; -import { ArticlesBySection, WebsiteBackendGasInfo, WebsiteBackendPriceInfo, WebsiteBackendRelayerInfo } from 'ts/types'; +import { + ArticlesBySection, + WebsiteBackendGasInfo, + WebsiteBackendJobInfo, + WebsiteBackendPriceInfo, + WebsiteBackendRelayerInfo, +} from 'ts/types'; import { fetchUtils } from 'ts/utils/fetch_utils'; import { utils } from 'ts/utils/utils'; const ETH_GAS_STATION_ENDPOINT = '/eth_gas_station'; +const JOBS_ENDPOINT = '/jobs'; const PRICES_ENDPOINT = '/prices'; const RELAYERS_ENDPOINT = '/relayers'; const WIKI_ENDPOINT = '/wiki'; @@ -15,6 +22,10 @@ export const backendClient = { const result = await fetchUtils.requestAsync(utils.getBackendBaseUrl(), ETH_GAS_STATION_ENDPOINT); return result; }, + async getJobInfosAsync(): Promise<WebsiteBackendJobInfo[]> { + const result = await fetchUtils.requestAsync(utils.getBackendBaseUrl(), JOBS_ENDPOINT); + return result; + }, async getPriceInfoAsync(tokenSymbols: string[]): Promise<WebsiteBackendPriceInfo> { if (_.isEmpty(tokenSymbols)) { return {}; 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 }); |