formatting cleanup

This commit is contained in:
thatmattlove 2024-06-16 16:53:30 -04:00
parent 4d5e259f6e
commit 8a9766b99f
2 changed files with 9 additions and 8 deletions

View file

@ -1,14 +1,14 @@
import { useMemo } from 'react';
import create from 'zustand';
import intersectionWith from 'lodash/intersectionWith'; import intersectionWith from 'lodash/intersectionWith';
import plur from 'plur'; import plur from 'plur';
import { useMemo } from 'react';
import isEqual from 'react-fast-compare'; import isEqual from 'react-fast-compare';
import create from 'zustand';
import { all, andJoin, dedupObjectArray, withDev } from '~/util'; import { all, andJoin, dedupObjectArray, withDev } from '~/util';
import type { UseFormClearErrors, UseFormSetError } from 'react-hook-form';
import type { MultiValue, SingleValue } from 'react-select';
import type { StateCreator } from 'zustand'; import type { StateCreator } from 'zustand';
import type { UseFormSetError, UseFormClearErrors } from 'react-hook-form'; import type { Device, Directive, FormData, SingleOption, Text } from '~/types';
import type { SingleValue, MultiValue } from 'react-select';
import type { SingleOption, Directive, FormData, Text, Device } from '~/types';
import type { UseDeviceReturn } from './use-device'; import type { UseDeviceReturn } from './use-device';
type FormStatus = 'form' | 'results'; type FormStatus = 'form' | 'results';
@ -61,7 +61,10 @@ interface FormStateType<Opt extends SingleOption = SingleOption> {
setSelection< setSelection<
Opt extends SingleOption, Opt extends SingleOption,
K extends keyof FormSelections<Opt> = keyof FormSelections<Opt>, K extends keyof FormSelections<Opt> = keyof FormSelections<Opt>,
>(field: K, value: FormSelections[K]): void; >(
field: K,
value: FormSelections[K],
): void;
setTarget(update: Partial<Target>): void; setTarget(update: Partial<Target>): void;
getDirective(): Directive | null; getDirective(): Directive | null;
reset(): void; reset(): void;

View file

@ -55,9 +55,7 @@ export function useLGQuery(
); );
try { try {
const data = await res.json(); const data = await res.json();
console.dir(data, { depth: null });
return data; return data;
// return await res.json();
} catch (err) { } catch (err) {
throw new Error(res.statusText); throw new Error(res.statusText);
} }