v3: linter and formatter pass
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
|
||||
import React, {
|
||||
useCallback,
|
||||
useEffect,
|
||||
useLayoutEffect,
|
||||
useRef,
|
||||
useState,
|
||||
} from "react";
|
||||
import { Link, useNavigate, useParams } from "react-router";
|
||||
|
||||
import { API_URL } from "../config/api.ts";
|
||||
@@ -151,7 +157,9 @@ export function UserPublicProfile() {
|
||||
if (next.length < prev.length) {
|
||||
const nextIds = new Set(next.map((d) => d.id));
|
||||
prev.forEach((d, idx) => {
|
||||
if (!nextIds.has(d.id)) removedDumpPositionsRef.current.set(d.id, idx);
|
||||
if (!nextIds.has(d.id)) {
|
||||
removedDumpPositionsRef.current.set(d.id, idx);
|
||||
}
|
||||
});
|
||||
}
|
||||
return { ...s, dumps: { ...s.dumps, items: next } };
|
||||
@@ -180,7 +188,9 @@ export function UserPublicProfile() {
|
||||
if (next.length < prev.length) {
|
||||
const nextIds = new Set(next.map((d) => d.id));
|
||||
prev.forEach((d, idx) => {
|
||||
if (!nextIds.has(d.id)) removedVotePositionsRef.current.set(d.id, idx);
|
||||
if (!nextIds.has(d.id)) {
|
||||
removedVotePositionsRef.current.set(d.id, idx);
|
||||
}
|
||||
});
|
||||
}
|
||||
return { ...s, votes: { ...s.votes, items: next } };
|
||||
@@ -422,7 +432,6 @@ export function UserPublicProfile() {
|
||||
}
|
||||
}, [lastVoteEvent, me, profileUserId]);
|
||||
|
||||
|
||||
// Save scroll position + loaded state to sessionStorage on scroll
|
||||
useEffect(() => {
|
||||
if (state.status !== "loaded") return;
|
||||
|
||||
Reference in New Issue
Block a user