-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
단체 메인, 관리 페이지 개발 #26
base: develop
Are you sure you want to change the base?
단체 메인, 관리 페이지 개발 #26
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다!
src/feature/organization/organizationMain/components/buttons/ActionButtons.tsx
Outdated
Show resolved
Hide resolved
import Button from "components/button/Button"; | ||
|
||
interface Props { | ||
organizationId: string | number | string[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
organizationId
의 타입에 string[]
도 추가해주신 특별한 이유가 있을까요~?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
음.. organizationId를 넘겨줄 때 타입 명시를 안해줬더니 error TS2322: Type 'string | number | string[]' is not assignable to type 'number’.
이런 에러가 발생해서 일단 추가해줬던 것 같습니다..
현재는 organizationId의 타입을 number로만 받는걸로 수정했습니다!
<Image | ||
width={size} | ||
height={size} | ||
alt="멤버 관리 아이콘" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오 접근성과 SEO 를 염두에 둔 alt text
좋습니다!! 👍
title={`${organizationId} 번 단체 상세 페이지`} | ||
description="단체 관리 및 맛집 목록 등 단체에 대한 정보를 볼 수 있는 페이지 " | ||
/> | ||
<ViewOrganizationMainPage organizationId={organizationId}></ViewOrganizationMainPage> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self-closing 태그가 되어도 좋을 것 같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수정했습니다!
/** | ||
* TODO: 서버에서 해당 단체에 대한 유저의 권한 받아오기 | ||
*/ | ||
const userAuth = 0; // 해당 단체에 대한 유저의 권한 (0: 관리자, 1: 멤버, 2: 방문객) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 값은 API 문서의 값인가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 맞습니다.
|
||
export default ViewOrganizationMainPage; | ||
|
||
const EmotionWrapper = styled.div``; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
없어도 될 것 같습니다! Fragment (<> </>
) 로 감싸도 될 것 같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수정했습니다!
if (userAuth === 0) { | ||
AuthButtonsComponent = ManagementButtons; | ||
} else if (userAuth === 1) { | ||
AuthButtonsComponent = MemberButtons; | ||
} else { | ||
AuthButtonsComponent = VisitorButtons; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ~ else if ~ else
가 중첩되어 가독성이 약간 좋지 않은 것 같습니다. 또한 let 사용으로 인해 불변성 보장을 받지 못할 것 같은데 혹시 아래와 같이 또한 컴포넌트 외부에서 처리 및 리렌더 될 때마다 새로 불러오지 않으므로 이 부분만 컴포넌트 위로 빼는 것은 어떨까요? ( 이렇게 하면 const
사용으로도 변경할 수 있을 것 같습니다!)
아래와 같은 형식을 생각하였습니다.
if (userAuth === 0) { | |
AuthButtonsComponent = ManagementButtons; | |
} else if (userAuth === 1) { | |
AuthButtonsComponent = MemberButtons; | |
} else { | |
AuthButtonsComponent = VisitorButtons; | |
} | |
const AUTH_BUTTONS_COMPONENT = { | |
0: ManagementButtons, | |
1: MemberButtons, | |
2: VisitorButtons, | |
} | |
const AuthButtonComponent = AUTH_BUTTONS_COMPONENT[userAuth] | |
return ( | |
... | |
<AuthButtonComponent /> | |
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오.. 넵 좋습니다.
제안해주신 사항 반영해서 수정했습니다!
<EmotionWrapper> | ||
<AuthButtonsComponent organizationId={organizationId} /> | ||
{(userAuth === 0 || userAuth === 1) && ( | ||
<ActionButtons organizationId={organizationId}></ActionButtons> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self-closing 해도 될 것 같습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수정했습니다!
@sera2002 제안 사항 반영 감사합니다!! 현 시점까지 반영해주신 부분은 👍 마크와 함께 스레드를 Resolve 했습니다. 수고하셨습니다! |
작성자: @sera2002
Related to #{이슈 번호 기입}
체크 리스트
작업 내역
단체 메인페이지
단체 정보 수정 페이지
단체 멤버 관리 페이지
단체 맛집 관리 페이지
단체 멤버 조회 페이지
비고
dataDisplay/Member