From 46b7fecafe283e814e2088373ec857747e4cf314 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 22 Mar 2018 11:56:12 +0000 Subject: Create helper function for converting dashes names for display --- packages/react-shared/src/utils/utils.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'packages/react-shared/src/utils/utils.ts') diff --git a/packages/react-shared/src/utils/utils.ts b/packages/react-shared/src/utils/utils.ts index b3acb081e..1538dd087 100644 --- a/packages/react-shared/src/utils/utils.ts +++ b/packages/react-shared/src/utils/utils.ts @@ -30,6 +30,9 @@ export const utils = { const id = name.replace(/ /g, '-'); return id; }, + convertDashesToSpaces(text: string) { + return text.replace(/-/g, ' '); + }, getEtherScanLinkIfExists( addressOrTxHash: string, networkId: number, -- cgit v1.2.3