refactor: shorten query state keys for improved readability
This commit is contained in:
parent
5fee3bc274
commit
3b2538736d
1 changed files with 7 additions and 7 deletions
|
|
@ -87,31 +87,31 @@ export const RicercaProvider: FC<{
|
||||||
const [isLoading, startTransition] = useTransition();
|
const [isLoading, startTransition] = useTransition();
|
||||||
|
|
||||||
const [map, setMap] = useQueryState(
|
const [map, setMap] = useQueryState(
|
||||||
"map",
|
"m",
|
||||||
parseAsBoolean.withDefault(false).withOptions({ startTransition }),
|
parseAsBoolean.withDefault(false).withOptions({ startTransition }),
|
||||||
);
|
);
|
||||||
const [tipo, setTipo] = useQueryState(
|
const [tipo, setTipo] = useQueryState(
|
||||||
"tipo",
|
"t",
|
||||||
parseAsString.withDefault("").withOptions({ startTransition }),
|
parseAsString.withDefault("").withOptions({ startTransition }),
|
||||||
);
|
);
|
||||||
const [comune, setComune] = useQueryState(
|
const [comune, setComune] = useQueryState(
|
||||||
"com",
|
"c",
|
||||||
parseAsString.withDefault("").withOptions({ startTransition }),
|
parseAsString.withDefault("").withOptions({ startTransition }),
|
||||||
);
|
);
|
||||||
const [consegna, setConsegna] = useQueryState(
|
const [consegna, setConsegna] = useQueryState(
|
||||||
"cons",
|
"f",
|
||||||
parseAsArrayOf(parseAsInteger).withOptions({ startTransition }),
|
parseAsArrayOf(parseAsInteger).withOptions({ startTransition }),
|
||||||
);
|
);
|
||||||
const [minBudget, setMinBudget] = useQueryState(
|
const [minBudget, setMinBudget] = useQueryState(
|
||||||
"minb",
|
"bmin",
|
||||||
parseAsInteger.withOptions({ startTransition }),
|
parseAsInteger.withOptions({ startTransition }),
|
||||||
);
|
);
|
||||||
const [maxBudget, setMaxBudget] = useQueryState(
|
const [maxBudget, setMaxBudget] = useQueryState(
|
||||||
"maxb",
|
"bmax",
|
||||||
parseAsInteger.withOptions({ startTransition }),
|
parseAsInteger.withOptions({ startTransition }),
|
||||||
);
|
);
|
||||||
const [sort, setSort] = useQueryState(
|
const [sort, setSort] = useQueryState(
|
||||||
"sort",
|
"s",
|
||||||
parseAsStringLiteral(sortOptions)
|
parseAsStringLiteral(sortOptions)
|
||||||
.withDefault("Recenti")
|
.withDefault("Recenti")
|
||||||
.withOptions({ startTransition }),
|
.withOptions({ startTransition }),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue