From 329a8dee2728075f787a74c63d9815ed18e57041 Mon Sep 17 00:00:00 2001 From: Choejeonghun Date: Tue, 5 Sep 2023 19:50:34 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20type=20=EC=A0=95=EC=9D=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/frames/token/UserContext.tsx | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/front/src/components/frames/token/UserContext.tsx b/front/src/components/frames/token/UserContext.tsx index 9b6ea69..53ea618 100644 --- a/front/src/components/frames/token/UserContext.tsx +++ b/front/src/components/frames/token/UserContext.tsx @@ -21,6 +21,27 @@ type UserContextType = [ const UserContext = createContext(undefined); +interface Member { + id: number; + name: string; +} + +interface Team { + id: number; + name: string; + industryGroup: string; +} + +interface TeamData { + id: number; + rank: string; + isAcceptMember: boolean; + isAcceptTeam: boolean; + nickname: string; + member: Member; + team: Team; +} + export const useUser = (): UserContextType => { const context = useContext(UserContext); if (!context) { @@ -33,7 +54,7 @@ export const UserProvider: React.FC<{ children: React.ReactNode }> = ({ children, }) => { const [user, setUser] = useState(null); - const [teamData, setTeamData] = useState(null); + const [teamData, setTeamData] = useState(); const navigate = useNavigate(); useEffect(() => {