From 11e07516c63e577cb4f1c075d5c70e9e2155e0ac Mon Sep 17 00:00:00 2001 From: semnil5202 Date: Thu, 21 Sep 2023 01:58:26 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=84=A4=EC=9D=B4=EB=B0=8D=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20=EB=88=84=EB=9D=BD=20=EC=98=A4=EB=A5=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20=EB=B0=8F=20=EB=84=A4=EC=9D=B4=EB=B0=8D=20=ED=86=B5?= =?UTF-8?q?=EC=9D=BC=EC=84=B1=20=EC=A4=80=EC=88=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/AuthorityRadioContainer/index.tsx | 14 +++++++------- .../src/components/TopicInfo/UpdatedTopicInfo.tsx | 2 +- frontend/src/pages/NewTopic.tsx | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/frontend/src/components/AuthorityRadioContainer/index.tsx b/frontend/src/components/AuthorityRadioContainer/index.tsx index eaea281e..61b4fd49 100644 --- a/frontend/src/components/AuthorityRadioContainer/index.tsx +++ b/frontend/src/components/AuthorityRadioContainer/index.tsx @@ -19,7 +19,7 @@ interface AuthorityRadioContainer { isPublic: boolean; authorizedMemberIds: number[]; setIsPrivate: React.Dispatch>; - setIsAll: React.Dispatch>; + setIsPublic: React.Dispatch>; setAuthorizedMemberIds: React.Dispatch>; permissionedMembers?: TopicAuthorMemberWithAuthorId[]; } @@ -29,7 +29,7 @@ const AuthorityRadioContainer = ({ isPublic, authorizedMemberIds, setIsPrivate, - setIsAll, + setIsPublic, setAuthorizedMemberIds, permissionedMembers, }: AuthorityRadioContainer) => { @@ -51,13 +51,13 @@ const AuthorityRadioContainer = ({ }, []); const onChangeInitAuthMembers = () => { - setIsAll(false); + setIsPublic(false); openModal('newTopic'); setAuthorizedMemberIds([]); }; - const onChangeInitAuthMembersWithSetIsAll = () => { - setIsAll(true); + const onChangeInitAuthMembersWithSetIsPublic = () => { + setIsPublic(true); setAuthorizedMemberIds([]); }; @@ -114,7 +114,7 @@ const AuthorityRadioContainer = ({ type="radio" id="permission-all" checked={isPublic} - onChange={onChangeInitAuthMembersWithSetIsAll} + onChange={onChangeInitAuthMembersWithSetIsPublic} tabIndex={5} /> @@ -242,7 +242,7 @@ const AuthorityRadioContainer = ({ variant="secondary" onClick={() => { closeModal('newTopic'); - setIsAll(true); + setIsPublic(true); setAuthorizedMemberIds([]); }} > diff --git a/frontend/src/components/TopicInfo/UpdatedTopicInfo.tsx b/frontend/src/components/TopicInfo/UpdatedTopicInfo.tsx index 5ee59b25..807798b9 100644 --- a/frontend/src/components/TopicInfo/UpdatedTopicInfo.tsx +++ b/frontend/src/components/TopicInfo/UpdatedTopicInfo.tsx @@ -143,7 +143,7 @@ const UpdatedTopicInfo = ({ isPublic={isPublic} authorizedMemberIds={authorizedMemberIds} setIsPrivate={setIsPrivate} - setIsAll={setIsPublic} + setIsPublic={setIsPublic} setAuthorizedMemberIds={setAuthorizedMemberIds} permissionedMembers={topicAuthorInfo?.permissionedMembers} /> diff --git a/frontend/src/pages/NewTopic.tsx b/frontend/src/pages/NewTopic.tsx index 58d070f9..6e7094bc 100644 --- a/frontend/src/pages/NewTopic.tsx +++ b/frontend/src/pages/NewTopic.tsx @@ -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); @@ -204,7 +204,7 @@ const NewTopic = () => { isPublic={isPublic} authorizedMemberIds={authorizedMemberIds} setIsPrivate={setIsPrivate} - setIsAll={setIsPublic} + setIsPublic={setIsPublic} setAuthorizedMemberIds={setAuthorizedMemberIds} />