From ca2cd1f2430342772ae893f0eae111accf7df0fa Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Tue, 1 Jun 2021 17:16:58 -0400 Subject: Add UniversityBadgeDisplayType --- src/components/profile/ProfileBadges.tsx | 29 +++++++++++++++++++++++++++++ src/components/profile/index.ts | 1 + 2 files changed, 30 insertions(+) create mode 100644 src/components/profile/ProfileBadges.tsx (limited to 'src/components/profile') diff --git a/src/components/profile/ProfileBadges.tsx b/src/components/profile/ProfileBadges.tsx new file mode 100644 index 00000000..838f7987 --- /dev/null +++ b/src/components/profile/ProfileBadges.tsx @@ -0,0 +1,29 @@ +import React from 'react'; +import {StyleSheet} from 'react-native'; +import {ScrollView} from 'react-native-gesture-handler'; +import {useSelector} from 'react-redux'; +import {RootState} from '../../store/rootReducer'; +import {ScreenType} from '../../types'; + +interface ProfileBadgesProps { + userXId: string | undefined; + screenType: ScreenType; +} + +const ProfileBadges: React.FC = ({userXId, screenType}) => { + const {badges, university} = useSelector((state: RootState) => + userXId ? state.userX[screenType][userXId].profile : state.user.profile, + ); + return ( + + {badges.map((badge) => ( + <> + // + ))} + + ); +}; + +const styles = StyleSheet.create({}); + +export default ProfileBadges; diff --git a/src/components/profile/index.ts b/src/components/profile/index.ts index c544c3f2..faf273d9 100644 --- a/src/components/profile/index.ts +++ b/src/components/profile/index.ts @@ -9,3 +9,4 @@ export {default as ProfileMoreInfoDrawer} from './ProfileMoreInfoDrawer'; export {default as MomentMoreInfoDrawer} from './MomentMoreInfoDrawer'; export {default as UniversityIcon} from './UniversityIcon'; export {default as TaggAvatar} from './TaggAvatar'; +export {default as ProfileBadges} from './ProfileBadges'; -- cgit v1.2.3-70-g09d2