aboutsummaryrefslogtreecommitdiff
path: root/src/components/profile/ProfileBadges.tsx
blob: 838f7987304983f551d627b99a8931ebcc33adcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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;