about complex page created

This commit is contained in:
2025-05-05 13:05:19 +05:00
parent cffb9dff36
commit 34e249b8f8
4 changed files with 117 additions and 85 deletions
+5
View File
@@ -0,0 +1,5 @@
function AboutComplexPage() {
return <div></div>;
}
export default AboutComplexPage;
+6 -4
View File
@@ -73,17 +73,17 @@ function SearchPage() {
view ? `&view=${view}` : ""
}${
debouncedCost.length > 0
? `&cost=${debouncedCost.map(Math.round).join(",")}`
? `&cost=${debouncedCost.map(Math.round).join()}`
: ""
}${
debouncedFloor.length > 0
? `&floor=${debouncedFloor.map(Math.round).join(",")}`
? `&floor=${debouncedFloor.map(Math.round).join()}`
: ""
}${
debouncedArea.length > 0
? `&area=${debouncedArea.map(Math.round).join(",")}`
? `&area=${debouncedArea.map(Math.round).join()}`
: ""
}${sort ? `&order=${SORT_OPTIONS[sort].split(" ").join(",")}` : ""}`
}${sort ? `&order=${SORT_OPTIONS[sort].split(" ").join()}` : ""}`
)
.json<IUnit[]>(),
getNextPageParam: (lastPage, _, lastPageIndex) =>
@@ -93,6 +93,8 @@ function SearchPage() {
const filtersRef = useRef<HTMLDivElement>(null);
const observerRef = useRef<HTMLDivElement>(null);
useEffect(() => window.scrollTo({ top: 0, behavior: "smooth" }), []);
useEffect(() => {
if (!hasNextPage || isFetchingNextPage) return;
const observerElement = observerRef.current;