import { type CSSProperties, useEffect, useLayoutEffect, useRef, useState, } from "react"; import { createPortal } from "react-dom"; import { useNavigate, useParams } from "react-router"; import { t } from "@lingui/core/macro"; import { useCategories } from "../hooks/useCategories.ts"; /** * Header dropdown that switches the feed scope between "All" and a category, * preserving the active feed tab (e.g. /music/new → /cinema/new). Rendered as * the leading item of the feed-sort tab row so it reads as part of the bar. * * A custom popover (not a native