[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,25 +1,25 @@
|
||||
import api, { getLinks } from '../api';
|
||||
import api, { getLinks } from "../api";
|
||||
|
||||
import { fetchRelationships } from './accounts';
|
||||
import { importFetchedAccounts } from './importer';
|
||||
import { openModal } from './modal';
|
||||
import { fetchRelationships } from "./accounts";
|
||||
import { importFetchedAccounts } from "./importer";
|
||||
import { openModal } from "./modal";
|
||||
|
||||
export const BLOCKS_FETCH_REQUEST = 'BLOCKS_FETCH_REQUEST';
|
||||
export const BLOCKS_FETCH_SUCCESS = 'BLOCKS_FETCH_SUCCESS';
|
||||
export const BLOCKS_FETCH_FAIL = 'BLOCKS_FETCH_FAIL';
|
||||
export const BLOCKS_FETCH_REQUEST = "BLOCKS_FETCH_REQUEST";
|
||||
export const BLOCKS_FETCH_SUCCESS = "BLOCKS_FETCH_SUCCESS";
|
||||
export const BLOCKS_FETCH_FAIL = "BLOCKS_FETCH_FAIL";
|
||||
|
||||
export const BLOCKS_EXPAND_REQUEST = 'BLOCKS_EXPAND_REQUEST';
|
||||
export const BLOCKS_EXPAND_SUCCESS = 'BLOCKS_EXPAND_SUCCESS';
|
||||
export const BLOCKS_EXPAND_FAIL = 'BLOCKS_EXPAND_FAIL';
|
||||
export const BLOCKS_EXPAND_REQUEST = "BLOCKS_EXPAND_REQUEST";
|
||||
export const BLOCKS_EXPAND_SUCCESS = "BLOCKS_EXPAND_SUCCESS";
|
||||
export const BLOCKS_EXPAND_FAIL = "BLOCKS_EXPAND_FAIL";
|
||||
|
||||
export const BLOCKS_INIT_MODAL = 'BLOCKS_INIT_MODAL';
|
||||
export const BLOCKS_INIT_MODAL = "BLOCKS_INIT_MODAL";
|
||||
|
||||
export function fetchBlocks() {
|
||||
return (dispatch, getState) => {
|
||||
dispatch(fetchBlocksRequest());
|
||||
|
||||
api(getState).get('/api/v1/blocks').then(response => {
|
||||
const next = getLinks(response).refs.find(link => link.rel === 'next');
|
||||
api(getState).get("/api/v1/blocks").then(response => {
|
||||
const next = getLinks(response).refs.find(link => link.rel === "next");
|
||||
dispatch(importFetchedAccounts(response.data));
|
||||
dispatch(fetchBlocksSuccess(response.data, next ? next.uri : null));
|
||||
dispatch(fetchRelationships(response.data.map(item => item.id)));
|
||||
@@ -50,7 +50,7 @@ export function fetchBlocksFail(error) {
|
||||
|
||||
export function expandBlocks() {
|
||||
return (dispatch, getState) => {
|
||||
const url = getState().getIn(['user_lists', 'blocks', 'next']);
|
||||
const url = getState().getIn(["user_lists", "blocks", "next"]);
|
||||
|
||||
if (url === null) {
|
||||
return;
|
||||
@@ -59,7 +59,7 @@ export function expandBlocks() {
|
||||
dispatch(expandBlocksRequest());
|
||||
|
||||
api(getState).get(url).then(response => {
|
||||
const next = getLinks(response).refs.find(link => link.rel === 'next');
|
||||
const next = getLinks(response).refs.find(link => link.rel === "next");
|
||||
dispatch(importFetchedAccounts(response.data));
|
||||
dispatch(expandBlocksSuccess(response.data, next ? next.uri : null));
|
||||
dispatch(fetchRelationships(response.data.map(item => item.id)));
|
||||
@@ -95,6 +95,6 @@ export function initBlockModal(account) {
|
||||
account,
|
||||
});
|
||||
|
||||
dispatch(openModal({ modalType: 'BLOCK' }));
|
||||
dispatch(openModal({ modalType: "BLOCK" }));
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user