HomePhabricator
Diffusion Comm 38a498dbe6ce

[native] Move complexity of `actionSheetConfig` to `useShowAvatarActionSheet`

Tags
None
Referenced Files
F494601: 3cc48b.png
Apr 19 2023, 9:28 AM
File Not Attached
Subscribers
None

Description

[native] Move complexity of actionSheetConfig to useShowAvatarActionSheet

Summary:
We can simplify the actionSheetConfig constructed in Edit*Avatar by moving some of what's common to useShowAvatarActionSheet. This cuts down on reptition a decent amount.

All of this refactoring brought the size of Edit*Avatar from 234 lines to 40:

3cc48b.png (1×1 px, 302 KB)

This should make the subsequent changes easier to manage.


Depends on D7506

Test Plan: Everything looks and works as it did previously + ESLint + Flow

Reviewers: ashoat, ginsu

Reviewed By: ashoat

Subscribers: tomek

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

Details

Provenance
atulAuthored on Apr 18 2023, 3:27 PM
Reviewer
ashoat
Differential Revision
D7507: [native] Move complexity of `actionSheetConfig` to `useShowAvatarActionSheet`
Parents
rCOMM45d2bc435f8a: [native] Pull `useShowAvatarActionSheet` out of `Edit*Avatar`
Branches
Unknown
Tags
Unknown