fixed various issues
This commit is contained in:
parent
082e822e05
commit
01becd0c59
6 changed files with 8 additions and 19 deletions
|
@ -7,13 +7,15 @@ exports.default = void 0;
|
||||||
|
|
||||||
var _react = _interopRequireDefault(require("react"));
|
var _react = _interopRequireDefault(require("react"));
|
||||||
|
|
||||||
|
var _SpaceBetween = _interopRequireDefault(require("@components/SpaceBetween"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
|
||||||
var AssetShareButtons = function AssetShareButtons(_ref) {
|
var AssetShareButtons = function AssetShareButtons(_ref) {
|
||||||
var host = _ref.host,
|
var host = _ref.host,
|
||||||
name = _ref.name,
|
name = _ref.name,
|
||||||
shortId = _ref.shortId;
|
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",
|
className: "link--primary",
|
||||||
target: "_blank",
|
target: "_blank",
|
||||||
href: "https://twitter.com/intent/tweet?text=".concat(host, "/").concat(shortId, "/").concat(name)
|
href: "https://twitter.com/intent/tweet?text=".concat(host, "/").concat(shortId, "/").concat(name)
|
||||||
|
|
|
@ -43,9 +43,6 @@ function (_React$Component) {
|
||||||
_createClass(ClickToCopy, [{
|
_createClass(ClickToCopy, [{
|
||||||
key: "copyToClipboard",
|
key: "copyToClipboard",
|
||||||
value: function copyToClipboard(event) {
|
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 elementToCopy = event.target.id;
|
||||||
var element = document.getElementById(elementToCopy);
|
var element = document.getElementById(elementToCopy);
|
||||||
element.select();
|
element.select();
|
||||||
|
|
|
@ -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 _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 _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 =
|
var AssetInfo =
|
||||||
/*#__PURE__*/
|
/*#__PURE__*/
|
||||||
function (_React$Component) {
|
function (_React$Component) {
|
||||||
function AssetInfo(props) {
|
function AssetInfo() {
|
||||||
var _this;
|
|
||||||
|
|
||||||
_classCallCheck(this, AssetInfo);
|
_classCallCheck(this, AssetInfo);
|
||||||
|
|
||||||
_this = _possibleConstructorReturn(this, _getPrototypeOf(AssetInfo).call(this, props));
|
return _possibleConstructorReturn(this, _getPrototypeOf(AssetInfo).apply(this, arguments));
|
||||||
_this.copyToClipboard = _this.copyToClipboard.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
||||||
return _this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_createClass(AssetInfo, [{
|
_createClass(AssetInfo, [{
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import SpaceBetween from '@components/SpaceBetween';
|
||||||
|
|
||||||
const AssetShareButtons = ({ host, name, shortId }) => {
|
const AssetShareButtons = ({ host, name, shortId }) => {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -6,9 +6,6 @@ class ClickToCopy extends React.Component {
|
||||||
this.copyToClipboard = this.copyToClipboard.bind(this);
|
this.copyToClipboard = this.copyToClipboard.bind(this);
|
||||||
}
|
}
|
||||||
copyToClipboard (event) {
|
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 elementToCopy = event.target.id;
|
||||||
const element = document.getElementById(elementToCopy);
|
const element = document.getElementById(elementToCopy);
|
||||||
element.select();
|
element.select();
|
||||||
|
|
|
@ -8,10 +8,6 @@ import AssetShareButtons from '@components/AssetShareButtons';
|
||||||
import ClickToCopy from '@components/ClickToCopy';
|
import ClickToCopy from '@components/ClickToCopy';
|
||||||
|
|
||||||
class AssetInfo extends React.Component {
|
class AssetInfo extends React.Component {
|
||||||
constructor (props) {
|
|
||||||
super(props);
|
|
||||||
this.copyToClipboard = this.copyToClipboard.bind(this);
|
|
||||||
}
|
|
||||||
render () {
|
render () {
|
||||||
const { asset: { shortId, claimData : { channelName, certificateId, description, name, claimId, fileExt, contentType, thumbnail, host } } } = this.props;
|
const { asset: { shortId, claimData : { channelName, certificateId, description, name, claimId, fileExt, contentType, thumbnail, host } } } = this.props;
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Add table
Reference in a new issue