From 23a26c075a3e20eac11c3aabf2a7b92a9b45d36e Mon Sep 17 00:00:00 2001 From: Thomas Zarebczan Date: Wed, 6 Jun 2018 15:22:28 -0400 Subject: [PATCH] fix share on Web (spee.ch) URLs --- src/renderer/component/viewOnWebButton/view.jsx | 14 +++++++++----- src/renderer/page/channel/view.jsx | 2 +- src/renderer/page/file/view.jsx | 9 ++------- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/renderer/component/viewOnWebButton/view.jsx b/src/renderer/component/viewOnWebButton/view.jsx index faf29b0a2..aa1dae86b 100644 --- a/src/renderer/component/viewOnWebButton/view.jsx +++ b/src/renderer/component/viewOnWebButton/view.jsx @@ -4,18 +4,22 @@ import * as icons from 'constants/icons'; import Button from 'component/button'; type Props = { - uri: ?string, + claimId: ?string, + claimName: ?string, }; export default (props: Props) => { - const { uri } = props; + const { claimId, claimName } = props; + const speechURL = claimName.startsWith('@') + ? `${claimName}:${claimId}` + : `${claimId}/${claimName}`; - return uri ? ( + return claimId && claimName ? (