type Query = Record<string, any>;
export function useRouteQuery(scene: string): Query {
  return decodeURIComponent(scene)
    ?.split('&')
    .reduce((query, item) => {
      const [key, value] = item?.split('=') ?? [];
      if (key) query[key] = value;
      return query;
    }, {} as Query) ?? {};
}