terry-staging #8
@@ -11,12 +11,12 @@ import { useLocation } from "react-router-dom";
|
||||
* anchor / deep-link targets keep their own scroll handling.
|
||||
*/
|
||||
export function ScrollToTop() {
|
||||
const { pathname, hash } = useLocation();
|
||||
const { pathname, search, hash } = useLocation();
|
||||
|
||||
useEffect(() => {
|
||||
if (hash) return;
|
||||
window.scrollTo({ top: 0, left: 0 });
|
||||
}, [pathname, hash]);
|
||||
}, [pathname, search, hash]);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -669,7 +669,7 @@ export function PublicLayout() {
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<BackToTop />
|
||||
{pathname === "/browse" ? <BackToTop /> : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ export const EASE_OUT = [0.22, 1, 0.36, 1] as const;
|
||||
|
||||
/** Base transition for reveal-style animations. */
|
||||
export const baseTransition: Transition = {
|
||||
duration: 0.4,
|
||||
duration: 0.25,
|
||||
ease: EASE_OUT,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user