1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

cleanup & animation improvement

This commit is contained in:
thatmattlove
2021-12-18 00:29:51 -07:00
parent ba2ce4b930
commit 4ee97ec0b2
11 changed files with 57 additions and 74 deletions

View File

@@ -235,3 +235,8 @@ export function useView(): FormStatus {
return ready ? 'results' : 'form';
}, [status, form]);
}
export function useFormInteractive(): boolean {
const { status, selections } = useFormState(({ status, selections }) => ({ status, selections }));
return status === 'results' || selections.queryLocation.length > 0;
}