diff options
author | Fabio Berger <me@fabioberger.com> | 2018-03-05 20:53:13 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-03-05 20:53:13 +0800 |
commit | 5a90fece8020f9be5c0f52f6ccf65dacb824b1cd (patch) | |
tree | 3597cbdbdf0fe1ef1ffadf164ce372db09812529 /packages/website/ts/utils | |
parent | 874e6678491d25aa7db300d68bdcb73863685c62 (diff) | |
download | dexon-sol-tools-5a90fece8020f9be5c0f52f6ccf65dacb824b1cd.tar dexon-sol-tools-5a90fece8020f9be5c0f52f6ccf65dacb824b1cd.tar.gz dexon-sol-tools-5a90fece8020f9be5c0f52f6ccf65dacb824b1cd.tar.bz2 dexon-sol-tools-5a90fece8020f9be5c0f52f6ccf65dacb824b1cd.tar.lz dexon-sol-tools-5a90fece8020f9be5c0f52f6ccf65dacb824b1cd.tar.xz dexon-sol-tools-5a90fece8020f9be5c0f52f6ccf65dacb824b1cd.tar.zst dexon-sol-tools-5a90fece8020f9be5c0f52f6ccf65dacb824b1cd.zip |
Moved over all pages/shared components and dependencies to react-shared
Diffstat (limited to 'packages/website/ts/utils')
-rw-r--r-- | packages/website/ts/utils/colors.ts | 48 | ||||
-rw-r--r-- | packages/website/ts/utils/configs.ts | 2 | ||||
-rw-r--r-- | packages/website/ts/utils/mui_theme.ts | 2 | ||||
-rw-r--r-- | packages/website/ts/utils/utils.ts | 23 |
4 files changed, 1 insertions, 74 deletions
diff --git a/packages/website/ts/utils/colors.ts b/packages/website/ts/utils/colors.ts deleted file mode 100644 index 2eead95c7..000000000 --- a/packages/website/ts/utils/colors.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { colors as materialUiColors } from 'material-ui/styles'; - -export const colors = { - ...materialUiColors, - gray40: '#F8F8F8', - grey50: '#FAFAFA', - grey100: '#F5F5F5', - lightestGrey: '#F0F0F0', - greyishPink: '#E6E5E5', - grey300: '#E0E0E0', - beigeWhite: '#E4E4E4', - grey350: '#cacaca', - grey400: '#BDBDBD', - lightGrey: '#BBBBBB', - grey500: '#9E9E9E', - grey: '#A5A5A5', - darkGrey: '#818181', - landingLinkGrey: '#919191', - grey700: '#616161', - grey750: '#515151', - grey800: '#424242', - darkerGrey: '#393939', - heroGrey: '#404040', - projectsGrey: '#343333', - darkestGrey: '#272727', - dharmaDarkGrey: '#252525', - lightBlue: '#60A4F4', - lightBlueA700: '#0091EA', - linkBlue: '#1D5CDE', - darkBlue: '#4D5481', - turquois: '#058789', - lightPurple: '#A81CA6', - purple: '#690596', - red200: '#EF9A9A', - red: '#E91751', - red500: '#F44336', - red600: '#E53935', - limeGreen: '#66DE75', - lightGreen: '#4DC55C', - lightestGreen: '#89C774', - brightGreen: '#00C33E', - green400: '#66BB6A', - green: '#4DA24B', - amber600: '#FFB300', - orange: '#E69D00', - amber800: '#FF8F00', - darkYellow: '#caca03', -}; diff --git a/packages/website/ts/utils/configs.ts b/packages/website/ts/utils/configs.ts index 388fc8530..7e9ba69de 100644 --- a/packages/website/ts/utils/configs.ts +++ b/packages/website/ts/utils/configs.ts @@ -94,8 +94,6 @@ export const configs = { [3]: [`https://ropsten.infura.io/${INFURA_API_KEY}`], [4]: [`https://rinkeby.infura.io/${INFURA_API_KEY}`], } as PublicNodeUrlsByNetworkId, - SCROLL_CONTAINER_ID: 'documentation', - SCROLL_TOP_ID: 'pageScrollTop', SHOULD_DEPRECATE_OLD_WETH_TOKEN: true, SYMBOLS_OF_MINTABLE_KOVAN_TOKENS: ['MKR', 'MLN', 'GNT', 'DGD', 'REP'], SYMBOLS_OF_MINTABLE_RINKEBY_ROPSTEN_TOKENS: [ diff --git a/packages/website/ts/utils/mui_theme.ts b/packages/website/ts/utils/mui_theme.ts index 32891baca..41bc2844b 100644 --- a/packages/website/ts/utils/mui_theme.ts +++ b/packages/website/ts/utils/mui_theme.ts @@ -1,5 +1,5 @@ +import { colors } from '@0xproject/react-shared'; import { getMuiTheme } from 'material-ui/styles'; -import { colors } from 'ts/utils/colors'; export const muiTheme = getMuiTheme({ appBar: { diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts index a1e11c85a..872b44eeb 100644 --- a/packages/website/ts/utils/utils.ts +++ b/packages/website/ts/utils/utils.ts @@ -4,7 +4,6 @@ import deepEqual = require('deep-equal'); import isMobile = require('is-mobile'); import * as _ from 'lodash'; import * as moment from 'moment'; -import { scroller } from 'react-scroll'; import { EtherscanLinkSuffixes, Networks, @@ -199,10 +198,6 @@ export const utils = { return 'production'; } }, - getIdFromName(name: string) { - const id = name.replace(/ /g, '-'); - return id; - }, getAddressBeginAndEnd(address: string): string { const truncatedAddress = `${address.substring(0, 6)}...${address.substr(-4)}`; // 0x3d5a...b287 return truncatedAddress; @@ -288,24 +283,6 @@ export const utils = { ); return isTestNetwork; }, - getCurrentBaseUrl() { - const port = window.location.port; - const hasPort = !_.isUndefined(port); - const baseUrl = `https://${window.location.hostname}${hasPort ? `:${port}` : ''}`; - return baseUrl; - }, - scrollToHash(hash: string, containerId: string): void { - let finalHash = hash; - if (_.isEmpty(hash)) { - finalHash = configs.SCROLL_TOP_ID; // scroll to the top - } - - scroller.scrollTo(finalHash, { - duration: 0, - offset: 0, - containerId, - }); - }, async onPageLoadAsync(): Promise<void> { if (document.readyState === 'complete') { return; // Already loaded |