From 01becd0c59c4ee95de4be6ccebb56cd477f079ca Mon Sep 17 00:00:00 2001 From: bill bittner Date: Tue, 3 Jul 2018 11:02:24 -0700 Subject: [PATCH] fixed various issues --- client/build/components/AssetShareButtons/index.js | 4 +++- client/build/components/ClickToCopy/index.js | 3 --- client/build/containers/AssetInfo/view.js | 12 ++++-------- client/src/components/AssetShareButtons/index.js | 1 + client/src/components/ClickToCopy/index.jsx | 3 --- client/src/containers/AssetInfo/view.jsx | 4 ---- 6 files changed, 8 insertions(+), 19 deletions(-) diff --git a/client/build/components/AssetShareButtons/index.js b/client/build/components/AssetShareButtons/index.js index 81d25996..8b54ec2b 100644 --- a/client/build/components/AssetShareButtons/index.js +++ b/client/build/components/AssetShareButtons/index.js @@ -7,13 +7,15 @@ exports.default = void 0; var _react = _interopRequireDefault(require("react")); +var _SpaceBetween = _interopRequireDefault(require("@components/SpaceBetween")); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var AssetShareButtons = function AssetShareButtons(_ref) { var host = _ref.host, name = _ref.name, shortId = _ref.shortId; - return _react.default.createElement(SpaceBetween, null, _react.default.createElement("a", { + return _react.default.createElement(_SpaceBetween.default, null, _react.default.createElement("a", { className: "link--primary", target: "_blank", href: "https://twitter.com/intent/tweet?text=".concat(host, "/").concat(shortId, "/").concat(name) diff --git a/client/build/components/ClickToCopy/index.js b/client/build/components/ClickToCopy/index.js index eebf6845..0c0b93e5 100644 --- a/client/build/components/ClickToCopy/index.js +++ b/client/build/components/ClickToCopy/index.js @@ -43,9 +43,6 @@ function (_React$Component) { _createClass(ClickToCopy, [{ key: "copyToClipboard", value: function copyToClipboard(event) { - console.log('event:', event); - console.log('event.target:', event.target); - console.log('event.target.id:', event.target.id); var elementToCopy = event.target.id; var element = document.getElementById(elementToCopy); element.select(); diff --git a/client/build/containers/AssetInfo/view.js b/client/build/containers/AssetInfo/view.js index ce21e896..55eefee1 100644 --- a/client/build/containers/AssetInfo/view.js +++ b/client/build/containers/AssetInfo/view.js @@ -37,21 +37,17 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } -function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); } - function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } +function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); } + var AssetInfo = /*#__PURE__*/ function (_React$Component) { - function AssetInfo(props) { - var _this; - + function AssetInfo() { _classCallCheck(this, AssetInfo); - _this = _possibleConstructorReturn(this, _getPrototypeOf(AssetInfo).call(this, props)); - _this.copyToClipboard = _this.copyToClipboard.bind(_assertThisInitialized(_assertThisInitialized(_this))); - return _this; + return _possibleConstructorReturn(this, _getPrototypeOf(AssetInfo).apply(this, arguments)); } _createClass(AssetInfo, [{ diff --git a/client/src/components/AssetShareButtons/index.js b/client/src/components/AssetShareButtons/index.js index 657b14a1..dfb0c0b9 100644 --- a/client/src/components/AssetShareButtons/index.js +++ b/client/src/components/AssetShareButtons/index.js @@ -1,4 +1,5 @@ import React from 'react'; +import SpaceBetween from '@components/SpaceBetween'; const AssetShareButtons = ({ host, name, shortId }) => { return ( diff --git a/client/src/components/ClickToCopy/index.jsx b/client/src/components/ClickToCopy/index.jsx index 17068cbb..35b7dba8 100644 --- a/client/src/components/ClickToCopy/index.jsx +++ b/client/src/components/ClickToCopy/index.jsx @@ -6,9 +6,6 @@ class ClickToCopy extends React.Component { this.copyToClipboard = this.copyToClipboard.bind(this); } copyToClipboard (event) { - console.log('event:', event); - console.log('event.target:', event.target); - console.log('event.target.id:', event.target.id); const elementToCopy = event.target.id; const element = document.getElementById(elementToCopy); element.select(); diff --git a/client/src/containers/AssetInfo/view.jsx b/client/src/containers/AssetInfo/view.jsx index 35971427..e251e81d 100644 --- a/client/src/containers/AssetInfo/view.jsx +++ b/client/src/containers/AssetInfo/view.jsx @@ -8,10 +8,6 @@ import AssetShareButtons from '@components/AssetShareButtons'; import ClickToCopy from '@components/ClickToCopy'; class AssetInfo extends React.Component { - constructor (props) { - super(props); - this.copyToClipboard = this.copyToClipboard.bind(this); - } render () { const { asset: { shortId, claimData : { channelName, certificateId, description, name, claimId, fileExt, contentType, thumbnail, host } } } = this.props; return (