fix bug and errors

This commit is contained in:
SlimusMinus
2026-10-06 01:00:10 +03:00
parent 73e3634ec4
commit d94a6782a4
50 changed files with 937 additions and 2642 deletions

View File

@@ -1,28 +0,0 @@
import { useEffect, useState } from "react";
/**
* Отдельный блюр-слой поверх ленты, независим от FeedTopBar.
* Прижат к верху общего контейнера, высота подстраивается под
* реальную высоту topBar (включая safe-area на iOS).
*/
export default function FeedBlurMask({ topBarRef }) {
const [height, setHeight] = useState(56);
useEffect(() => {
const el = topBarRef?.current;
if (!el) return;
const update = () => setHeight(el.getBoundingClientRect().height || 56);
update();
const ro = new ResizeObserver(update);
ro.observe(el);
return () => ro.disconnect();
}, [topBarRef]);
return (
<div
className="f-feed-blur-mask"
style={{ height }}
aria-hidden="true"
/>
);
}

View File

@@ -35,6 +35,9 @@ export default function PullToRefresh({ containerRef, onRefresh, disabled = fals
const el = containerRef.current;
if (!el) return;
el.classList.toggle("f-ptr-active", visible);
// Размонтирование с visible=true иначе навсегда оставило бы маску
// затухания и блокировку pointer-events на контейнере ленты.
return () => el.classList.remove("f-ptr-active");
}, [visible, containerRef]);
useEffect(() => {

View File

@@ -1,21 +0,0 @@
export default function TypeFilterBar({ value, onChange, t }) {
const options = [
{ key: "loss", label: t('feed.filterLoss') },
{ key: null, label: t('feed.filterAll') },
{ key: "found", label: t('feed.filterFound') },
];
return (
<div className="f-filter-bar">
{options.map(opt => (
<button
key={opt.key ?? "all"}
className={`f-filter-btn${value === opt.key ? " active" : ""}`}
onClick={() => onChange(opt.key)}
>
{opt.label}
</button>
))}
</div>
);
}