* Revert "fix: revert bookings redesign (#25172)"
This reverts commit 1f102bf3b4.
* add bookings-v3 feature flag
* put things behind a feature flag
* remove no longer needed test
* revert e2e tests
* put back description
* revert AvatarGroup
* apply feedback
* remove "view" booking action
* remove Alert (When the bookings query errors, this branch now renders only the alert and skips the data-table filter/segment controls. Those controls moved into BookingsList, so in error states users can no longer clear or tweak filters to recover from the failure, effectively trapping them behind the alert.)
* address feedback
* revert useMediaQuery
15 lines
381 B
TypeScript
15 lines
381 B
TypeScript
import { useQueryState } from "nuqs";
|
|
|
|
export function useSelectedBookingId() {
|
|
return useQueryState("selectedId", {
|
|
defaultValue: null,
|
|
parse: (value) => {
|
|
if (!value) return null;
|
|
const parsed = parseInt(value, 10);
|
|
return isNaN(parsed) ? null : parsed;
|
|
},
|
|
serialize: (value) => (value ? String(value) : ""),
|
|
clearOnDefault: true,
|
|
});
|
|
}
|