diff --git a/apps/frontend/app/(tabs)/(profile)/feedback.tsx b/apps/frontend/app/(tabs)/(profile)/feedback.tsx index 547990f..2ada18b 100644 --- a/apps/frontend/app/(tabs)/(profile)/feedback.tsx +++ b/apps/frontend/app/(tabs)/(profile)/feedback.tsx @@ -1,10 +1,32 @@ +import { icons } from '@/assets'; import { AccountInfo, ChipFilter, DividerX, ReviewCard } from '@/components'; import { useProfile, useReviews } from '@/hooks'; import cn from 'clsx'; import { useEffect, useState } from 'react'; -import { FlatList, Platform, useColorScheme, View } from 'react-native'; +import { FlatList, Image, Platform, Text, useColorScheme, View } from 'react-native'; import { SafeAreaView } from 'react-native-safe-area-context'; +const FeedbackEmptyState = () => { + const isDark = useColorScheme() === 'dark'; + + return ( + + + + + No Feedback Yet + + Feedback from other users will appear here + + + + ); +}; + const Feedback = () => { const isDark = useColorScheme() === 'dark'; @@ -19,6 +41,9 @@ const Feedback = () => { android: 'pb-24', }); + const isEmpty = reviewsList.length === 0; + const isAllEmpty = filterReviewsByType('all').length === 0; + useEffect(() => { setReviewsList(filterReviewsByType(reviewType.id)); }, [reviewType]); @@ -36,11 +61,14 @@ const Feedback = () => { data={reviewsList} initialNumToRender={0} showsVerticalScrollIndicator={false} - keyExtractor={(item, index) => item.id.toString()} + keyExtractor={(item) => item.id.toString()} contentContainerClassName={adsListStyle} renderItem={({ item, index }) => } ItemSeparatorComponent={() => } - ListFooterComponent={() => } + ListFooterComponent={ + !isEmpty ? () => : null + } + ListEmptyComponent={isAllEmpty ? : null} /> diff --git a/apps/frontend/assets/icons/dark/message-favorite.png b/apps/frontend/assets/icons/dark/message-favorite.png new file mode 100644 index 0000000..fa15339 Binary files /dev/null and b/apps/frontend/assets/icons/dark/message-favorite.png differ diff --git a/apps/frontend/assets/icons/light/message-favorite.png b/apps/frontend/assets/icons/light/message-favorite.png new file mode 100644 index 0000000..977543c Binary files /dev/null and b/apps/frontend/assets/icons/light/message-favorite.png differ diff --git a/apps/frontend/assets/index.ts b/apps/frontend/assets/index.ts index fdff2e4..1b250ce 100644 --- a/apps/frontend/assets/index.ts +++ b/apps/frontend/assets/index.ts @@ -74,6 +74,9 @@ const icons = { tickHalo: require('./icons/light/tick-halo.png'), clockHalo: require('./icons/light/clock-halo.png'), + // Feedback + messageFav: require('./icons/light/message-favorite.png'), + // Active Tab active: { home: require('./icons/light/active/home.png'), @@ -150,6 +153,9 @@ const icons = { tickHalo: require('./icons/dark/tick-halo.png'), clockHalo: require('./icons/dark/clock-halo.png'), + // Feedback + messageFav: require('./icons/dark/message-favorite.png'), + // Active Tab active: { home: require('./icons/dark/active/home.png'),