aboutsummaryrefslogtreecommitdiff
path: root/src/components/profile
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/profile')
-rw-r--r--src/components/profile/ProfileBadges.tsx29
-rw-r--r--src/components/profile/index.ts1
2 files changed, 30 insertions, 0 deletions
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<ProfileBadgesProps> = ({userXId, screenType}) => {
+ const {badges, university} = useSelector((state: RootState) =>
+ userXId ? state.userX[screenType][userXId].profile : state.user.profile,
+ );
+ return (
+ <ScrollView horizontal>
+ {badges.map((badge) => (
+ <> </>
+ // <BadgeIcon key={badge.id} badge={{...badge, img: }} />
+ ))}
+ </ScrollView>
+ );
+};
+
+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';