diff --git a/src/hooks/use-store-list.ts b/src/hooks/use-store-list.ts index 06153f4d..d4b87d70 100644 --- a/src/hooks/use-store-list.ts +++ b/src/hooks/use-store-list.ts @@ -1,15 +1,18 @@ -import { getList, StoreList } from "libs/firebase/store"; -import { useState, useMemo } from "react"; - -export const useStoreList = (uuid: string) => { - const [storeList, setListState] = useState([]); - const [isLoading, setLodingState] = useState(true); - useMemo(() => { - getList(uuid).then((res) => { - setListState(res); - setLodingState(false); - }); - }, [uuid]); - - return [storeList, setListState, isLoading]; -}; \ No newline at end of file +import { getList, StoreList } from "libs/firebase/store"; +import { useState, useMemo } from "react"; +import type { Dispatch, SetStateAction } from "react"; + +export const useStoreList = ( + uuid: string, +): [StoreList, Dispatch>, boolean] => { + const [storeList, setListState] = useState([]); + const [isLoading, setLodingState] = useState(true); + useMemo(() => { + getList(uuid).then((res) => { + setListState(res); + setLodingState(false); + }); + }, [uuid]); + + return [storeList, setListState, isLoading]; +};