import React from 'react'; import PropTypes from 'prop-types'; import { UncontrolledTooltip } from 'reactstrap'; import { withTranslation } from 'react-i18next'; import { withUnstatedContainers } from './UnstatedUtils'; import { toastError } from '~/client/util/apiNotification'; import { apiv3Put } from '~/client/util/apiv3-client'; import AppContainer from '~/client/services/AppContainer'; class LegacyBookmarkButton extends React.Component { constructor(props) { super(props); this.handleClick = this.handleClick.bind(this); } async handleClick() { if (this.props.onBookMarkClicked == null) { return; } this.props.onBookMarkClicked(); } render() { const { appContainer, t, isBookmarked, sumOfBookmarks, } = this.props; const { isGuestUser } = appContainer; return (