import { Category } from '../config/categories-config' ; import { useUrlParam } from './use-url-param' ; export function useUrlCategoryParam ( ) { return useUrlParam ( 'category' , { fromParam : ( x ) => { return x as Category | 'categories' ; } , toParam : ( x ) => { return x as string ; } } ) ; }