aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/utils/utils.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-03-05 20:53:13 +0800
committerFabio Berger <me@fabioberger.com>2018-03-05 20:53:13 +0800
commit5a90fece8020f9be5c0f52f6ccf65dacb824b1cd (patch)
tree3597cbdbdf0fe1ef1ffadf164ce372db09812529 /packages/website/ts/utils/utils.ts
parent874e6678491d25aa7db300d68bdcb73863685c62 (diff)
downloaddexon-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/utils.ts')
-rw-r--r--packages/website/ts/utils/utils.ts23
1 files changed, 0 insertions, 23 deletions
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