fix(ui): the page's end scrolls out from under Back to top

The button floats over the bottom-right corner, and at the end of a long table it covered the closing
pager's '100' and 'All'. While it is up, PageScroller ends the page a button's height later (only
then, so a full-height layout gets no scrollbar). Its shown state is a shared store read through a
use… wrapper: a store's .use() called straight from a component is memoized by the React Compiler
and never re-renders (contract: store.contract.test.ts).
This commit is contained in:
2026-09-27 16:28:18 +02:00
parent 51f881681b
commit 86884e368e
5 changed files with 73 additions and 6 deletions
@@ -0,0 +1,10 @@
import { createStore } from "../../lib/store";
// Whether the Back-to-top button is up. It floats over the page's bottom-right corner, so PageScroller
// reads this to keep the END of the page clear of it while it shows: a table's closing pager sat under
// the button — "100" and "All" covered (E28 UAT, the channel manager on a short window).
export const backToTopShown = createStore(false);
export function useBackToTopShown(): boolean {
return backToTopShown.use();
}