Skip to content

Commit

Permalink
fix: 네이밍 변경 누락 오류 수정 및 네이밍 통일성 준수 (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
semnil5202 authored Sep 20, 2023
1 parent d2dabd4 commit c26bd75
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
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

0 comments on commit c26bd75

Please sign in to comment.