diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-11-14 15:55:38 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-11-14 15:55:38 -0600 |
commit | 9170040acb3c85a11fcf29c832360c0765a1ba58 (patch) | |
tree | 5cb6a3850eaac1dfafb131d7508f0da0ae4150e8 /src/view/com/modals/EditProfile.tsx | |
parent | 96dc748733561affb9ee9f9d188b040cf5bb009e (diff) | |
download | voidsky-9170040acb3c85a11fcf29c832360c0765a1ba58.tar.zst |
Update all state on profile change
Diffstat (limited to 'src/view/com/modals/EditProfile.tsx')
-rw-r--r-- | src/view/com/modals/EditProfile.tsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/view/com/modals/EditProfile.tsx b/src/view/com/modals/EditProfile.tsx index 2bc02afe6..7310ab592 100644 --- a/src/view/com/modals/EditProfile.tsx +++ b/src/view/com/modals/EditProfile.tsx @@ -11,7 +11,13 @@ import * as Profile from '../../../third-party/api/src/client/types/app/bsky/act export const snapPoints = ['80%'] -export function Component({profileView}: {profileView: ProfileViewModel}) { +export function Component({ + profileView, + onUpdate, +}: { + profileView: ProfileViewModel + onUpdate?: () => void +}) { const store = useStores() const [error, setError] = useState<string>('') const [displayName, setDisplayName] = useState<string>( @@ -41,6 +47,7 @@ export function Component({profileView}: {profileView: ProfileViewModel}) { Toast.show('Profile updated', { position: Toast.positions.TOP, }) + onUpdate?.() store.shell.closeModal() } catch (e: any) { console.error(e) |