Skip to content

Commit

Permalink
feat: 세팅 페이지에서 내 자신에 대한 작업 버튼은 보이지 않도록 함
Browse files Browse the repository at this point in the history
  • Loading branch information
surinkwon committed Oct 2, 2024
1 parent b98ac05 commit d3b7943
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
20 changes: 14 additions & 6 deletions frontend/src/components/setting/JoinRequestBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,20 @@ const JoinRequestBlock = ({ username, imageUrl }: JoinRequestBlockProps) => {
<div className="w-[18.75rem]"></div>
<div className="w-[30rem]">
{myRole === "LEADER" && (
<button
className="px-2 py-1 text-white rounded w-fit bg-error-red text-xxs"
type="button"
>
프로젝트에서 제거
</button>
<>
<button
className="px-2 py-1 text-white rounded w-fit text-xxs bg-middle-green"
type="button"
>
참여 수락
</button>
<button
className="px-2 py-1 text-white rounded w-fit bg-error-red text-xxs"
type="button"
>
참여 거절
</button>
</>
)}
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/components/setting/MemberBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ interface MemberBlockProps extends SettingMemberDTO {}

const MemberBlock = ({ username, imageUrl, role }: MemberBlockProps) => {
const myRole = useMemberStore((state) => state.myInfo.role);
const myUserName = useMemberStore((state) => state.myInfo.username);

return (
<div className="flex w-full gap-3">
Expand All @@ -16,7 +17,7 @@ const MemberBlock = ({ username, imageUrl, role }: MemberBlockProps) => {
<p className="">{role}</p>
</div>
<div className="w-[30rem]">
{myRole === "LEADER" && (
{myRole === "LEADER" && myUserName !== username && (
<button
className="px-2 py-1 text-white rounded w-fit bg-error-red text-xxs"
type="button"
Expand Down

0 comments on commit d3b7943

Please sign in to comment.