mirror of
https://github.com/Qortal/qapp-core.git
synced 2025-06-13 09:21:20 +00:00
fix stringify
This commit is contained in:
parent
a9d824cb4d
commit
93313b50ca
@ -1,4 +1,5 @@
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { useCacheStore } from "../state/cache";
|
||||
|
||||
export const useScrollTracker = (listName: string, hasList: boolean, disableScrollTracker?: boolean) => {
|
||||
const elementRef = useRef<HTMLDivElement | null>(null);
|
||||
@ -10,7 +11,8 @@ export const useScrollTracker = (listName: string, hasList: boolean, disableScro
|
||||
if (!listName || !hasList) return;
|
||||
|
||||
const SCROLL_KEY = `scroll-position-${listName}`;
|
||||
|
||||
const isExpired = useCacheStore.getState().isListExpired(listName);
|
||||
if(isExpired === true) return
|
||||
// 🔹 Restore scroll when the component mounts
|
||||
const savedPosition = sessionStorage.getItem(SCROLL_KEY);
|
||||
if (savedPosition) {
|
||||
|
@ -283,7 +283,7 @@ const addItems = useListStore((s) => s.addItems);
|
||||
delete copyParams.after
|
||||
delete copyParams.before
|
||||
delete copyParams.offset
|
||||
setSearchParamsForList(listName, copyParams)
|
||||
setSearchParamsForList(listName, JSON.stringify(copyParams))
|
||||
setIsLoading(false)
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user