Skip to content

Commit

Permalink
chore: don't use destructuring with useSelector
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-bo-davis committed Dec 12, 2023
1 parent 96bab12 commit ed35706
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const ProfileFlagsEdit: React.FC<Props> = (props: Props) => {
const { modalRef, profileId } = props;

const { allProfileFlags, profileFlags, associateProfileFlag } = useProfileFlags(profileId);
const { loading } = useSelector((state: RootState) => selectProfileAsyncPropertiesById(state, profileId));
const loading = useSelector((state: RootState) => selectProfileAsyncPropertiesById(state, profileId))?.loading;

const anchorRef = useRef(null);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type Props = OwnProps;

const ProfileFlagsList: React.FC<Props> = ({ disassociateRef, enableDisassociate, profileId }) => {
const { profileFlags, disassociateProfileFlag } = useProfileFlags(profileId);
const { loading } = useSelector((state: RootState) => selectProfileAsyncPropertiesById(state, profileId));
const loading = useSelector((state: RootState) => selectProfileAsyncPropertiesById(state, profileId))?.loading;

const renderDisassociate = (flag: ProfileFlag) => {
if (!enableDisassociate) return null;
Expand Down

0 comments on commit ed35706

Please sign in to comment.