import { useSessionStore } from '@/store/session' import { useEffect, useState } from 'react' export type UserType = 'hwj' | 'order' | 'musubi' | 'musubi_con' | 'partner' // 로그인 된 회원 유형에 따라 조사 매물 목록 변경됨 export function useUserType() { const { session } = useSessionStore() const [userType, setUserType] = useState(null) const [store, setStore] = useState(null) const [construction_point, setConstructionPoint] = useState(null) // TODO: 회원 유형 설정 useEffect(() => { if (!session?.isLoggedIn) return setUserType('musubi_con') }, [session]) return { userType, store, construction_point, } }