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} />