[build] upgrade eslint to 9.37.0 (#88)
Co-authored-by: tobi <tobi.smethurst@protonmail.com> Reviewed-on: https://codeberg.org/superseriousbusiness/masto-fe-standalone/pulls/88 Co-authored-by: Zoë Bijl <moiety@noreply.codeberg.org> Co-committed-by: Zoë Bijl <moiety@noreply.codeberg.org>
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
// Package imports
|
||||
import PropTypes from 'prop-types';
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from "prop-types";
|
||||
import { PureComponent } from "react";
|
||||
|
||||
import { injectIntl, defineMessages } from 'react-intl';
|
||||
import { injectIntl, defineMessages } from "react-intl";
|
||||
|
||||
import LocalSettingsNavigationItem from './item';
|
||||
import LocalSettingsNavigationItem from "./item";
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
|
||||
const messages = defineMessages({
|
||||
general: { id: 'settings.general', defaultMessage: 'General' },
|
||||
compose: { id: 'settings.compose_box_opts', defaultMessage: 'Compose box' },
|
||||
content_warnings: { id: 'settings.content_warnings', defaultMessage: 'Content Warnings' },
|
||||
collapsed: { id: 'settings.collapsed_statuses', defaultMessage: 'Collapsed toots' },
|
||||
media: { id: 'settings.media', defaultMessage: 'Media' },
|
||||
preferences: { id: 'settings.preferences', defaultMessage: 'Preferences' },
|
||||
close: { id: 'settings.close', defaultMessage: 'Close' },
|
||||
general: { id: "settings.general", defaultMessage: "General" },
|
||||
compose: { id: "settings.compose_box_opts", defaultMessage: "Compose box" },
|
||||
content_warnings: { id: "settings.content_warnings", defaultMessage: "Content Warnings" },
|
||||
collapsed: { id: "settings.collapsed_statuses", defaultMessage: "Collapsed toots" },
|
||||
media: { id: "settings.media", defaultMessage: "Media" },
|
||||
preferences: { id: "settings.preferences", defaultMessage: "Preferences" },
|
||||
close: { id: "settings.close", defaultMessage: "Close" },
|
||||
});
|
||||
|
||||
class LocalSettingsNavigation extends PureComponent {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Package imports
|
||||
import PropTypes from 'prop-types';
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from "prop-types";
|
||||
import { PureComponent } from "react";
|
||||
|
||||
import classNames from 'classnames';
|
||||
import classNames from "classnames";
|
||||
|
||||
import { Icon } from 'flavours/glitch/components/icon';
|
||||
import { Icon } from "flavours/glitch/components/icon";
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
|
||||
@@ -41,33 +41,37 @@ export default class LocalSettingsPage extends PureComponent {
|
||||
title,
|
||||
} = this.props;
|
||||
|
||||
const finalClassName = classNames('glitch', 'local-settings__navigation__item', {
|
||||
const finalClassName = classNames("glitch", "local-settings__navigation__item", {
|
||||
active,
|
||||
}, className);
|
||||
|
||||
const iconElem = icon ? <Icon fixedWidth id={icon} /> : (textIcon ? <span className='text-icon-button'>{textIcon}</span> : null);
|
||||
|
||||
if (href) return (
|
||||
<a
|
||||
href={href}
|
||||
className={finalClassName}
|
||||
title={title}
|
||||
aria-label={title}
|
||||
>
|
||||
{iconElem} <span>{title}</span>
|
||||
</a>
|
||||
);
|
||||
else if (onNavigate) return (
|
||||
<button
|
||||
onClick={handleClick}
|
||||
className={finalClassName}
|
||||
title={title}
|
||||
aria-label={title}
|
||||
>
|
||||
{iconElem} <span>{title}</span>
|
||||
</button>
|
||||
);
|
||||
else return null;
|
||||
if (href) {
|
||||
return (
|
||||
<a
|
||||
href={href}
|
||||
className={finalClassName}
|
||||
title={title}
|
||||
aria-label={title}
|
||||
>
|
||||
{iconElem} <span>{title}</span>
|
||||
</a>
|
||||
);
|
||||
} else if (onNavigate) {
|
||||
return (
|
||||
<button
|
||||
onClick={handleClick}
|
||||
className={finalClassName}
|
||||
title={title}
|
||||
aria-label={title}
|
||||
>
|
||||
{iconElem} <span>{title}</span>
|
||||
</button>
|
||||
);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user