Skip to content

Commit cf1a32c

Browse files
committed
UserStatusScreen [nfc]: Move useContext upward, with selectors
As Greg suggests: #5277 (comment)
1 parent bbba246 commit cf1a32c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/user-statuses/UserStatusScreen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ const inputValueFromStatusText = (t: $PropertyType<UserStatus, 'status_text'>):
4949
export default function UserStatusScreen(props: Props): Node {
5050
const { navigation } = props;
5151

52+
const _ = useContext(TranslationContext);
5253
const auth = useSelector(getAuth);
5354
const ownUserId = useSelector(getOwnUserId);
5455
const userStatusText = useSelector(state => getUserStatus(state, ownUserId).status_text);
5556

5657
const [textInputValue, setTextInputValue] = useState<string>(
5758
inputValueFromStatusText(userStatusText),
5859
);
59-
const _ = useContext(TranslationContext);
6060

6161
const sendToServer = useCallback(
6262
partialUserStatus => {

0 commit comments

Comments
 (0)