Fix URL navigation around edit history

This commit is contained in:
Maciej Ziarkowski 2021-03-11 19:08:44 +00:00
parent 3f4464afbf
commit ec6e892aeb

View File

@ -3,5 +3,5 @@ import { intParamTransform } from './url-param-transform';
import { useUrlParam } from './use-url-param';
export function useUrlBuildingParam(defaultMode: 'view' | 'edit' | 'multi-edit', defaultCategory: Category | 'categories' = 'categories') {
return useUrlParam('building', intParamTransform, '/:mode/:category/:building?', {mode: defaultMode, category: defaultCategory});
return useUrlParam('building', intParamTransform, '/:mode/:category/:building?/(history)?', {mode: defaultMode, category: defaultCategory});
}