Refactor context reducer to TypeScript (#34506)

This commit is contained in:
Eugen Rochko 2025-04-28 15:38:40 +02:00 committed by GitHub
parent bd9223f0b9
commit 17d8e2b6e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 308 additions and 234 deletions

View file

@ -39,9 +39,9 @@ export const NotificationMention: React.FC<{
unread: boolean;
}> = ({ notification, unread }) => {
const [isDirect, isReply] = useAppSelector((state) => {
const status = state.statuses.get(notification.statusId) as
| Status
| undefined;
const status = notification.statusId
? (state.statuses.get(notification.statusId) as Status | undefined)
: undefined;
if (!status) return [false, false] as const;