diff options
| author | Ivan Chen <ivan@thetaggid.com> | 2020-12-08 23:17:23 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-08 23:17:23 -0500 |
| commit | 792115326fc6af583f422082537885bc8061d051 (patch) | |
| tree | c397e80a5573cd791c45cc006b36570efa91d73c /src/components/taggs/Tagg.tsx | |
| parent | 84616a6143fea58899eafa915a73592eaad25361 (diff) | |
[TMA-410] Edit Non-Integrated Socials (#126)
* removed refs, added KB avoidance, UI done
* missed some things
* now parsing response correctly from backend
* fixed naming
* now allow empty strings to un-link a social
* hide field if empty, allow empty string, fixed taggs bar not updating bug
* Fix bug where non integrated socials do not show up on edit profile page
Co-authored-by: Ashm Walia <40498934+ashmgarv@users.noreply.github.com>
Co-authored-by: Ashm Walia <ashmwalia@outlook.com>
Diffstat (limited to 'src/components/taggs/Tagg.tsx')
| -rw-r--r-- | src/components/taggs/Tagg.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/taggs/Tagg.tsx b/src/components/taggs/Tagg.tsx index 086b3c87..8158cbac 100644 --- a/src/components/taggs/Tagg.tsx +++ b/src/components/taggs/Tagg.tsx @@ -26,7 +26,7 @@ interface TaggProps { isLinked: boolean; isIntegrated: boolean; setTaggsNeedUpdate: (_: boolean) => void; - setSocialDataNeedUpdate: (_: string) => void; + setSocialDataNeedUpdate: (social: string, username: string) => void; userXId: string; screenType: ScreenType; } @@ -84,7 +84,7 @@ const Tagg: React.FC<TaggProps> = ({ if (isIntegrated) { handlePressForAuthBrowser(social).then((success) => { setTaggsNeedUpdate(success); - if (success) setSocialDataNeedUpdate(social); + if (success) setSocialDataNeedUpdate(social, ''); }); } else { setModalVisible(true); @@ -112,6 +112,7 @@ const Tagg: React.FC<TaggProps> = ({ if (await registerNonIntegratedSocialLink(social, username)) { Alert.alert(`Successfully linked ${social} 🎉`); setTaggsNeedUpdate(true); + setSocialDataNeedUpdate(social, username); } else { // If we display too fast the alert will get dismissed with the modal setTimeout(() => { |
