Skip to content

Commit

Permalink
fix: 모든 멤버의 프로필 모달에 왕관 달아주는 버그 수정 (#317)
Browse files Browse the repository at this point in the history
* fix: 모든 멤버의 프로필 모달에 왕관 달아주는 버그 수정

* fix: 할 일 목록 수정할 때 공백 불가능하도록 수정
  • Loading branch information
hyunow authored Sep 12, 2024
1 parent 4d01e68 commit a01f085
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/[groupId]/_components/member-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function MemberCard({ member, groupId, isAdmin, teamName }: MemberCardProps) {
userImage={member.userImage}
userName={member.userName}
userEmail={member.userEmail}
isAdmin={isAdmin}
userRole={member.role}
/>
));

Expand Down
6 changes: 3 additions & 3 deletions app/[groupId]/_components/modal/modal-member-profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ interface ModalMemberProfileProps {
userImage: string;
userName: string;
userEmail: string;
isAdmin: boolean;
userRole: string;
}

function ModalMemberProfile({
close,
userImage,
userName,
userEmail,
isAdmin,
userRole,
}: ModalMemberProfileProps) {
const handleButtonClick = async () => {
try {
Expand Down Expand Up @@ -61,7 +61,7 @@ function ModalMemberProfile({

<div className="flex flex-col items-center justify-center gap-[8px]">
<div className="flex items-center gap-[4px]">
{isAdmin && (
{userRole === "ADMIN" && (
<Image src={Crown} alt="왕관" width={20} height={20} />
)}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ function ModalTaskListNameEdit({
<Button
btnSize="large"
btnStyle="solid"
disabled={!isDirty || editTaskListMutation.isPending}
disabled={
!isDirty ||
!taskListName.trim() ||
editTaskListMutation.isPending
}
>
{editTaskListMutation.isPending ? "수정 중..." : "수정하기"}
</Button>
Expand Down

0 comments on commit a01f085

Please sign in to comment.