HomePhabricator
Diffusion Comm 72b8c7fcb7f5

[web] Consolidate `errorMessage` and `updateSuccessful` state in…

Description

[web] Consolidate errorMessage and updateSuccessful state in EmojiAvatarSelectionModal

Summary:
Since we're only displaying one error message, it doesn't really make sense to store the errorMessage in component state as string... what we really need is a boolean.

That would leave us with two boolean component states (updateFailed and updateSuccessful). Since those states are mutually exclusive, it makes sense to consolidate them into a single state of type ?('success' | 'failure').

NOTE: Still think it makes sense to leave D8280 and D8281 up since they cover some other changes (styling and whatnot) and squashing this diff with those may lead to a large changeset. They also may better show how things build up? However, if it's easier for the reviewer to have them squashed I'm happy to update this stack to do so.

Depends on D8281

Test Plan:
Things continue to work as expected:

Reviewers: ashoat, ginsu, rohan

Reviewed By: rohan

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D8283

Details