[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,16 +1,16 @@
|
||||
import { defineMessages } from 'react-intl';
|
||||
import { defineMessages } from "react-intl";
|
||||
|
||||
const messages = defineMessages({
|
||||
unexpectedTitle: { id: 'alert.unexpected.title', defaultMessage: 'Oops!' },
|
||||
unexpectedMessage: { id: 'alert.unexpected.message', defaultMessage: 'An unexpected error occurred.' },
|
||||
rateLimitedTitle: { id: 'alert.rate_limited.title', defaultMessage: 'Rate limited' },
|
||||
rateLimitedMessage: { id: 'alert.rate_limited.message', defaultMessage: 'Please retry after {retry_time, time, medium}.' },
|
||||
unexpectedTitle: { id: "alert.unexpected.title", defaultMessage: "Oops!" },
|
||||
unexpectedMessage: { id: "alert.unexpected.message", defaultMessage: "An unexpected error occurred." },
|
||||
rateLimitedTitle: { id: "alert.rate_limited.title", defaultMessage: "Rate limited" },
|
||||
rateLimitedMessage: { id: "alert.rate_limited.message", defaultMessage: "Please retry after {retry_time, time, medium}." },
|
||||
});
|
||||
|
||||
export const ALERT_SHOW = 'ALERT_SHOW';
|
||||
export const ALERT_DISMISS = 'ALERT_DISMISS';
|
||||
export const ALERT_CLEAR = 'ALERT_CLEAR';
|
||||
export const ALERT_NOOP = 'ALERT_NOOP';
|
||||
export const ALERT_SHOW = "ALERT_SHOW";
|
||||
export const ALERT_DISMISS = "ALERT_DISMISS";
|
||||
export const ALERT_CLEAR = "ALERT_CLEAR";
|
||||
export const ALERT_NOOP = "ALERT_NOOP";
|
||||
|
||||
export function dismissAlert(alert) {
|
||||
return {
|
||||
@@ -43,9 +43,9 @@ export function showAlertForError(error, skipNotFound = false) {
|
||||
return { type: ALERT_NOOP };
|
||||
}
|
||||
|
||||
if (status === 429 && headers['x-ratelimit-reset']) {
|
||||
const reset_date = new Date(headers['x-ratelimit-reset']);
|
||||
return showAlert(messages.rateLimitedTitle, messages.rateLimitedMessage, { 'retry_time': reset_date });
|
||||
if (status === 429 && headers["x-ratelimit-reset"]) {
|
||||
const reset_date = new Date(headers["x-ratelimit-reset"]);
|
||||
return showAlert(messages.rateLimitedTitle, messages.rateLimitedMessage, { "retry_time": reset_date });
|
||||
}
|
||||
|
||||
let message = statusText;
|
||||
|
||||
Reference in New Issue
Block a user