fixed various issues

This commit is contained in:
bill bittner 2018-07-03 11:02:24 -07:00
parent 082e822e05
commit 01becd0c59
6 changed files with 8 additions and 19 deletions

View file

@ -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)

View file

@ -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();

View file

@ -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, [{

View file

@ -1,4 +1,5 @@
import React from 'react';
import SpaceBetween from '@components/SpaceBetween';
const AssetShareButtons = ({ host, name, shortId }) => {
return (

View file

@ -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();

View file

@ -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 (