Skip to content
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

[FE] hotfix: 네이밍 변경 누락 오류 수정 및 네이밍 통일성 준수 #470

Merged
merged 1 commit into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions frontend/src/components/AuthorityRadioContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface AuthorityRadioContainer {
isPublic: boolean;
authorizedMemberIds: number[];
setIsPrivate: React.Dispatch<React.SetStateAction<boolean>>;
setIsAll: React.Dispatch<React.SetStateAction<boolean>>;
setIsPublic: React.Dispatch<React.SetStateAction<boolean>>;
setAuthorizedMemberIds: React.Dispatch<React.SetStateAction<number[]>>;
permissionedMembers?: TopicAuthorMemberWithAuthorId[];
}
Expand All @@ -29,7 +29,7 @@ const AuthorityRadioContainer = ({
isPublic,
authorizedMemberIds,
setIsPrivate,
setIsAll,
setIsPublic,
setAuthorizedMemberIds,
permissionedMembers,
}: AuthorityRadioContainer) => {
Expand All @@ -51,13 +51,13 @@ const AuthorityRadioContainer = ({
}, []);

const onChangeInitAuthMembers = () => {
setIsAll(false);
setIsPublic(false);
openModal('newTopic');
setAuthorizedMemberIds([]);
};

const onChangeInitAuthMembersWithSetIsAll = () => {
setIsAll(true);
const onChangeInitAuthMembersWithSetIsPublic = () => {
setIsPublic(true);
setAuthorizedMemberIds([]);
};

Expand Down Expand Up @@ -114,7 +114,7 @@ const AuthorityRadioContainer = ({
type="radio"
id="permission-all"
checked={isPublic}
onChange={onChangeInitAuthMembersWithSetIsAll}
onChange={onChangeInitAuthMembersWithSetIsPublic}
tabIndex={5}
/>
<Space size={1} />
Expand Down Expand Up @@ -242,7 +242,7 @@ const AuthorityRadioContainer = ({
variant="secondary"
onClick={() => {
closeModal('newTopic');
setIsAll(true);
setIsPublic(true);
setAuthorizedMemberIds([]);
}}
>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/TopicInfo/UpdatedTopicInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ const UpdatedTopicInfo = ({
isPublic={isPublic}
authorizedMemberIds={authorizedMemberIds}
setIsPrivate={setIsPrivate}
setIsAll={setIsPublic}
setIsPublic={setIsPublic}
setAuthorizedMemberIds={setAuthorizedMemberIds}
permissionedMembers={topicAuthorInfo?.permissionedMembers}
/>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/NewTopic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const NewTopic = () => {
description: formValues.description,
pins: pulledPinIds ? pulledPinIds.split(',') : [],
publicity: isPrivate ? 'PRIVATE' : 'PUBLIC',
permissionType: isAll && !isPrivate ? 'ALL_MEMBERS' : 'GROUP_ONLY',
permissionType: isPublic && !isPrivate ? 'ALL_MEMBERS' : 'GROUP_ONLY',
};

const data = JSON.stringify(objectData);
Expand Down Expand Up @@ -204,7 +204,7 @@ const NewTopic = () => {
isPublic={isPublic}
authorizedMemberIds={authorizedMemberIds}
setIsPrivate={setIsPrivate}
setIsAll={setIsPublic}
setIsPublic={setIsPublic}
setAuthorizedMemberIds={setAuthorizedMemberIds}
/>

Expand Down