diff options
author | Ashm Walia <40498934+ashmgarv@users.noreply.github.com> | 2020-12-30 11:36:44 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-30 14:36:44 -0500 |
commit | 38661e00281363b0f4ad32f0b29d739e1ca09164 (patch) | |
tree | 316cd837b6cc6ae24783f1d93d6c9ee7fb898f68 /src/utils/common.ts | |
parent | bd2f89805d0bb1c2f1d08fe8d91099aa4f109d35 (diff) |
[TMA - 457]Change followers to friends (#149)
* One commit to replace followers with friends
* Move block unblock to drawer and some cosmetic changes
* Options to edit own profile when viewing
* Changes for University Class
* Small fix
* Made ProfileOnboarding a scroll view and other small changes
* Small fix
* Small fix thanks to ivan and tanmay
* Add ?
Diffstat (limited to 'src/utils/common.ts')
-rw-r--r-- | src/utils/common.ts | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/utils/common.ts b/src/utils/common.ts index 27411149..a2f88e8b 100644 --- a/src/utils/common.ts +++ b/src/utils/common.ts @@ -3,12 +3,12 @@ import {Linking} from 'react-native'; import {BROWSABLE_SOCIAL_URLS, TOGGLE_BUTTON_TYPE} from '../constants'; export const getToggleButtonText: ( - button_type: string, + buttonType: string, state: boolean, -) => string | null = (button_type, state) => { - switch (button_type) { - case TOGGLE_BUTTON_TYPE.FOLLOW_UNFOLLOW: - return state ? 'Unfollow' : 'Follow'; +) => string | null = (buttonType, state) => { + switch (buttonType) { + case TOGGLE_BUTTON_TYPE.FRIEND_UNFRIEND: + return state ? 'Unfriend' : 'Add Friend'; case TOGGLE_BUTTON_TYPE.BLOCK_UNBLOCK: return state ? 'Unblock' : 'Block'; default: @@ -25,6 +25,11 @@ export const handleOpenSocialUrlOnBrowser = ( } }; +//Returns university class just like we would like to display on profile page +export const getUniversityClass = (universityClass: number) => { + return `Class of ${(universityClass % 2000).toString()}'`; +}; + export const getDateAge: ( date: moment.Moment, ) => 'today' | 'yesterday' | 'thisWeek' | 'unknown' = (date: moment.Moment) => { |