Skip to content

Commit

Permalink
fix: 비회원일 때 정보가 없어서 생기는 에러 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
llddang committed Sep 27, 2024
1 parent 49fb13e commit 7582abe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Sidebar/SidebarContent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const SidebarContent = ({ isOpen, setIsOpen }: SidebarContentProps) => {
const { data: sidebarInfo } = useGetSideBarInfoQuery();

useEffect(() => {
const myTeams = sidebarInfo
const myTeams = sidebarInfo?.body.myTeamsAndStudies
? sidebarInfo.body.myTeamsAndStudies.map((team: { teamId: number }) => team.teamId)
: [];
setMyTeams(myTeams);
Expand Down

0 comments on commit 7582abe

Please sign in to comment.