optional param

This commit is contained in:
Josh Hawkins 2024-03-15 09:26:20 -05:00
parent a4eb01a0ae
commit 35499c3e3a

View File

@ -42,7 +42,7 @@ export function usePersistedOverlayState<S extends string>(
const currentLocationState = location.state;
const setOverlayStateValue = useCallback(
(value: S | undefined, replace: boolean = false) => {
(value: S | undefined, replace?: boolean) => {
setPersistedValue(value);
const newLocationState = { ...currentLocationState };
newLocationState[key] = value;