fix: es_419 locale, run prettier, remove unused line

This commit is contained in:
David Ralph
2022-11-26 21:32:50 +00:00
committed by GitHub
parent 8035b35436
commit e161b82ad3
16 changed files with 65 additions and 54 deletions

View File

@@ -78,7 +78,7 @@ export default class Create extends PureComponent {
'birthday',
'location',
'greetingName',
'backgroundStartTime'
'backgroundStartTime',
];
Object.keys(data).forEach((key) => {
if (ignore.includes(key)) {

View File

@@ -9,22 +9,19 @@ import Select from '@mui/material/Select';
import Chip from '@mui/material/Chip';
function ChipSelect({ label, options, name }) {
let start = (localStorage.getItem('apiCategories') || "").split(',');
if (start[0] === "") start = [];
let start = (localStorage.getItem('apiCategories') || '').split(',');
if (start[0] === '') start = [];
const [optionsSelected, setoptionsSelected] = useState(start);
const handleChange = (event) => {
const {
target: { value },
} = event;
setoptionsSelected(
typeof value === 'string' ? value.split(',') : value,
);
localStorage.setItem('apiCategories', value)
setoptionsSelected(typeof value === 'string' ? value.split(',') : value);
localStorage.setItem('apiCategories', value);
};
return (
<div>
<FormControl>

View File

@@ -34,7 +34,7 @@ export default class FileUpload extends PureComponent {
compressAccurately(file, {
size: 450,
accuracy: 0.9
accuracy: 0.9,
}).then(async (res) => {
if (settingsSize + res.size > 4850000) {
return toast(variables.getMessage('toasts.no_storage'));

View File

@@ -76,7 +76,11 @@ export default class LanguageSettings extends PureComponent {
{variables.getMessage('modals.main.settings.sections.language.quote')}
</span>
<div className="languageSettings">
<Radio name="quoteLanguage" options={this.state.quoteLanguages.map(l => l.name)} category="quote" />
<Radio
name="quoteLanguage"
options={this.state.quoteLanguages.map((l) => l.name)}
category="quote"
/>
</div>
</>
);

View File

@@ -106,12 +106,15 @@ export default class OrderSettings extends PureComponent {
async getNews() {
const data = await (await fetch(variables.constants.API_URL + '/news')).json();
data.date = new window.Date(data.date).toLocaleDateString(variables.languagecode.replace('_', '-'), {
year: 'numeric',
month: 'long',
day: 'numeric',
});
data.date = new window.Date(data.date).toLocaleDateString(
variables.languagecode.replace('_', '-'),
{
year: 'numeric',
month: 'long',
day: 'numeric',
},
);
this.setState({
news: data,
newsDone: true,

View File

@@ -164,7 +164,7 @@ export default class CustomSettings extends PureComponent {
compressAccurately(file, {
size: 450,
accuracy: 0.9
accuracy: 0.9,
}).then(async (res) => {
if (settingsSize + res.size > 4850000) {
return toast(variables.getMessage('toasts.no_storage'));