mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix useFeedStateString eslint
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import { useMemo } from "react"
|
import { useMemo } from "react"
|
||||||
|
|
||||||
const useFeedStateString = (subplebbits) => {
|
const useFeedStateString = (subplebbits) => {
|
||||||
|
return useMemo(() => {
|
||||||
const getClientUrls = (regex) => {
|
const getClientUrls = (regex) => {
|
||||||
const clientUrls = new Set()
|
const clientUrls = new Set()
|
||||||
for (const clientType in subplebbits.clients) {
|
for (const clientType in subplebbits.clients) {
|
||||||
@@ -14,13 +15,11 @@ const useFeedStateString = (subplebbits) => {
|
|||||||
return [...clientUrls]
|
return [...clientUrls]
|
||||||
}
|
}
|
||||||
|
|
||||||
return useMemo(() => {
|
|
||||||
if (!subplebbits) {
|
if (!subplebbits) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
const states = {}
|
const states = {}
|
||||||
const clientUrls = {}
|
|
||||||
for (const subplebbit of subplebbits) {
|
for (const subplebbit of subplebbits) {
|
||||||
states[subplebbit?.updatingState] = (states[subplebbit?.updatingState] || 0) + 1
|
states[subplebbit?.updatingState] = (states[subplebbit?.updatingState] || 0) + 1
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user