feat: add sorts to user pages
This commit is contained in:
1 parent
d427d4b2fc
commit
c0aaf08a9f
12 files changed
+129
-69
No files matched your search
@@ -20,3 +20,21 @@ export function getInboxItemPublished(item: InboxItemView): string {
|
||||
|
||||
return item.person_mention.published
|
||||
}
|
||||
|
||||
export function isRead(
|
||||
item: PersonMentionView | CommentReplyView | PrivateMessageView
|
||||
) {
|
||||
if ('person_mention' in item) {
|
||||
return (item as PersonMentionView).person_mention.read
|
||||
}
|
||||
|
||||
if ('comment_reply' in item) {
|
||||
return (item as CommentReplyView).comment_reply.read
|
||||
}
|
||||
|
||||
if ('private_message' in item) {
|
||||
return (item as PrivateMessageView).private_message.read
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
Reference in new issue
Block a user