diff --git a/src/components/Announcement/PrivateAnnoucement/NotificationCenter/KyberAIWatchlist.tsx b/src/components/Announcement/PrivateAnnoucement/NotificationCenter/KyberAIWatchlist.tsx index a73cd70f13..c077f940ef 100644 --- a/src/components/Announcement/PrivateAnnoucement/NotificationCenter/KyberAIWatchlist.tsx +++ b/src/components/Announcement/PrivateAnnoucement/NotificationCenter/KyberAIWatchlist.tsx @@ -31,6 +31,8 @@ export default function AnnouncementItem({ const theme = useTheme() const navigate = useNavigate() const [expand, setExpand] = useState(false) + const slice = 3 + const minimalAssets = assets.slice(0, slice) return ( setExpand(!expand)}> @@ -49,10 +51,10 @@ export default function AnnouncementItem({ Here is an update on the tokens in your watchlist: {!expand && - assets.slice(0, 3).map((token, i) => ( + minimalAssets.map((token, i) => ( - {i === 2 ? ', ...' : ', '} + {i === minimalAssets.length - 1 ? (minimalAssets.length < slice ? '' : ', ...') : ', '} ))}