fix: remove unused & bugged feature

This commit is contained in:
David Ralph
2022-08-31 22:05:11 +01:00
parent 2563850fcc
commit 7880489034
14 changed files with 0 additions and 102 deletions

View File

@@ -6,7 +6,6 @@ import { toast } from 'react-toastify';
import {
MdIosShare,
MdFlag,
MdWarning,
MdAccountCircle,
MdBugReport,
MdFormatQuote,
@@ -61,23 +60,6 @@ export default class Item extends PureComponent {
return null;
}
let warningHTML;
if (this.props.data.quote_api) {
warningHTML = (
<div className="itemWarning">
<div className="topRow">
<MdWarning />
<div className="title">
{variables.getMessage('modals.main.marketplace.product.quote_warning.title')}
</div>
</div>
<div className="subtitle">
{variables.getMessage('modals.main.marketplace.product.quote_warning.description')}
</div>
</div>
);
}
// prevent console error
let iconsrc = variables.constants.DDG_IMAGE_PROXY + this.props.data.icon;
if (!this.props.data.icon) {
@@ -160,22 +142,6 @@ export default class Item extends PureComponent {
{variables.getMessage('modals.main.marketplace.product.description')}
</span>
<span dangerouslySetInnerHTML={{ __html: this.props.data.description }} />
{/*
{this.props.data.description.length > 100 ? (
<div className="showMore" onClick={() => this.toggleShowMore()}>
{this.state.showMore === true ? (
<>
<span>{variables.getMessage('modals.main.marketplace.product.show_less')}</span>
<MdKeyboardArrowDown />
</>
) : (
<>
<span>{variables.getMessage('modals.main.marketplace.product.show_more')}</span>
<MdKeyboardArrowUp />
</>
)}
</div>
) : null}*/}
<div className="moreInfo">
<div className="infoItem">
<MdBugReport />
@@ -279,7 +245,6 @@ export default class Item extends PureComponent {
<button>{variables.getMessage('modals.main.marketplace.product.explore')}</button>
</div>
) : null}
{warningHTML}
</div>
</div>
</div>

View File

@@ -214,24 +214,6 @@ export default class Quote extends PureComponent {
return this.doOffline();
}
const quotePackAPI = JSON.parse(localStorage.getItem('quoteAPI'));
if (quotePackAPI) {
try {
const data = await (await fetch(quotePackAPI.url)).json();
const author = data[quotePackAPI.author] || quotePackAPI.author;
const installed = JSON.parse(localStorage.getItem('installed'));
// todo: make this actually get the correct quote pack, instead of the first available
const info = installed.find((i) => i.type === 'quotes');
return this.setState({
quote: '"' + data[quotePackAPI.quote] + '"',
author,
authorimg: info.icon_url,
});
} catch (e) {
return this.doOffline();
}
}
const quotePack = [];
const installed = JSON.parse(localStorage.getItem('installed'));
installed.forEach((item) => {