mirror of
https://github.com/mue/mue.git
synced 2026-07-19 06:54:10 +02:00
style: make comments consistent by placing them on their own line
This commit is contained in:
@@ -4,7 +4,8 @@ import ArrowBackIcon from '@material-ui/icons/ArrowBack';
|
||||
|
||||
export default function Item(props) {
|
||||
let warningHTML;
|
||||
try { // For some reason it breaks sometimes so we use try/catch
|
||||
// For some reason it breaks sometimes so we use try/catch
|
||||
try {
|
||||
if (props.content.content.data.quote_api) {
|
||||
warningHTML = (
|
||||
<div className='productInformation'>
|
||||
@@ -19,7 +20,8 @@ export default function Item(props) {
|
||||
// ignore
|
||||
}
|
||||
|
||||
let iconsrc = 'https://external-content.duckduckgo.com/iu/?u=' + props.data.icon; // prevent console error
|
||||
// prevent console error
|
||||
let iconsrc = 'https://external-content.duckduckgo.com/iu/?u=' + props.data.icon;
|
||||
if (!props.data.icon) {
|
||||
iconsrc = null;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import React from 'react';
|
||||
|
||||
export default function Items(props) {
|
||||
// todo: add message here
|
||||
if (props.items.length === 0) {
|
||||
return null; // todo: add message here
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -42,14 +42,15 @@ export default class Marketplace extends React.PureComponent {
|
||||
async toggle(type, data) {
|
||||
switch (type) {
|
||||
case 'item':
|
||||
let info; // get item info
|
||||
let info;
|
||||
// get item info
|
||||
try {
|
||||
info = await (await fetch(`${Constants.MARKETPLACE_URL}/item/${this.props.type}/${data}`)).json();
|
||||
} catch (e) {
|
||||
return toast(this.props.toastLanguage.error);
|
||||
}
|
||||
|
||||
// check if already installed
|
||||
// check if already installed
|
||||
let button = this.buttons.install;
|
||||
|
||||
const installed = JSON.parse(localStorage.getItem('installed'));
|
||||
|
||||
@@ -10,7 +10,8 @@ export default class FileUpload extends React.PureComponent {
|
||||
|
||||
if (this.props.type === 'settings') {
|
||||
reader.readAsText(file, 'UTF-8');
|
||||
} else { // background upload
|
||||
} else {
|
||||
// background upload
|
||||
if (file.size > 2000000) {
|
||||
return toast('File is over 2MB');
|
||||
}
|
||||
|
||||
@@ -25,8 +25,9 @@ export default class About extends React.PureComponent {
|
||||
updateMsg = 'Update available: ' + version;
|
||||
}
|
||||
|
||||
// TODO: REMOVE BOTS AND MAKE IT ACTUALLY WORK,
|
||||
this.setState({
|
||||
contributors: contributors, // TODO: REMOVE BOTS AND MAKE IT ACTUALLY WORK,
|
||||
contributors: contributors,
|
||||
update: updateMsg
|
||||
});
|
||||
}
|
||||
@@ -51,7 +52,8 @@ export default class About extends React.PureComponent {
|
||||
<a href={'https://github.com/' + item.login} target='_blank' rel='noopener noreferrer'><img draggable='false' className='abouticon' src={item.avatar_url + '&size=256'} alt={item.login}></img></a>
|
||||
</Tooltip>
|
||||
)}
|
||||
{other_contributors.map((item) => // for those who contributed without opening a pull request
|
||||
{// for those who contributed without opening a pull request
|
||||
other_contributors.map((item) =>
|
||||
<Tooltip title={item.login} placement='top' key={item.login}>
|
||||
<a href={'https://github.com/' + item.login} target='_blank' rel='noopener noreferrer'><img draggable='false' className='abouticon' src={item.avatar_url + '&size=256'} alt={item.login}></img></a>
|
||||
</Tooltip>
|
||||
|
||||
@@ -23,8 +23,9 @@ export default class GreetingSettings extends React.PureComponent {
|
||||
}
|
||||
|
||||
changeDate(data) {
|
||||
//soon
|
||||
if (data === 'reset') {
|
||||
return; //soon
|
||||
return;
|
||||
}
|
||||
|
||||
localStorage.setItem('birthday', data);
|
||||
|
||||
Reference in New Issue
Block a user