Files
Katia Bulatova b1987dc090 feat(webapp): billing limits — pause, reject, recovery, and settings UI (#3996)
## Summary

Adds Billing Limits to the webapp.

Customers can set a monthly spend cap. When usage crosses the limit,
billable environments enter a grace period. If the limit is not resolved
before grace expires, new triggers are rejected until the organization
increases or removes the limit.
2026-06-26 17:12:53 +02:00

15 lines
397 B
TypeScript

import { useLocation } from "@remix-run/react";
import { useEffect, useRef } from "react";
/** Scroll a page body container back to the top when navigating to a route. */
export function useScrollContainerToTop<T extends HTMLElement>() {
const ref = useRef<T>(null);
const location = useLocation();
useEffect(() => {
ref.current?.scrollTo(0, 0);
}, [location.key]);
return ref;
}