Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. getHigherResProviderPhotoUrl = ({ photoURL, providerId }: any): ?string => {
  2. //workaround to get higer res profile picture
  3. let result = photoURL;
  4. if (providerId.includes('google')) {
  5. result = photoURL.replace('s96-c', 's400-c');
  6. } else if (providerId.includes('facebook')) {
  7. result = `${photoURL}?type=large`;
  8. }
  9. return result;
  10. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement