11import {
2- LucideBell ,
32 LucideTrendingUp ,
43 LucideTrendingDown ,
54 LucideArrowUp ,
65 LucideArrowDown ,
76 LucideUserCheck ,
8- RefreshCcwIcon ,
97} from 'lucide-react' ;
108import { Card } from '@/components/ui/card' ;
11- import { Notification } from '@/store/notifications' ;
9+ import { NotificationObject } from '@/store/notifications' ;
1210import { Button } from '@/components/ui/button' ;
1311import { cn } from '@/lib/utils' ;
1412import DefaultHeader from '@/components/Header/DefaultHeader' ;
@@ -24,22 +22,18 @@ import BrightIdProfilePicture from '@/components/BrightIdProfilePicture';
2422import { Link } from 'react-router' ;
2523import { Fragment } from 'react/jsx-runtime' ;
2624import {
27- alertLoadingSelector ,
2825 alertsSelector ,
2926 markAllAsRead ,
3027 markAsRead ,
31- NotificationObject ,
3228 NotificationType ,
33- } from '@/store/notifications/slice ' ;
29+ } from '@/store/notifications' ;
3430import { useStore } from 'react-redux' ;
3531import { compactFormat } from '@/utils/number' ;
3632import {
3733 getBgClassNameOfAuraRatingObject ,
3834 getTextClassNameOfAuraRatingObject ,
3935} from '@/constants' ;
4036import { useMemo } from 'react' ;
41- import Tooltip from '@/components/Shared/Tooltip' ;
42- import { ratingToText } from '@/constants/chart' ;
4337
4438// Define icons for evaluation categories
4539export const subjectViewAsIconColored : {
@@ -63,37 +57,6 @@ const iconMap = {
6357 evaluation : < LucideUserCheck className = "text-blue-500" /> ,
6458} ;
6559
66- function getIcon ( notification : Notification ) {
67- if (
68- notification . changeType === 'level' ||
69- notification . changeType === 'score'
70- ) {
71- if (
72- typeof ( notification as any ) . newValue === 'number' &&
73- typeof ( notification as any ) . oldValue === 'number'
74- ) {
75- if ( notification . changeType === 'level' ) {
76- return ( notification as any ) . newValue > ( notification as any ) . oldValue
77- ? iconMap . level . up
78- : iconMap . level . down ;
79- }
80- if ( notification . changeType === 'score' ) {
81- return ( notification as any ) . newValue > ( notification as any ) . oldValue
82- ? iconMap . score . up
83- : iconMap . score . down ;
84- }
85- } else {
86- return notification . changeType === 'level'
87- ? iconMap . level . up
88- : iconMap . score . up ;
89- }
90- }
91- if ( notification . changeType === 'evaluation' ) {
92- return iconMap . evaluation ;
93- }
94- return < LucideBell /> ;
95- }
96-
9760export function parseTitleAndDescription (
9861 description : string ,
9962 type : NotificationType ,
0 commit comments