37c7f909a3
* Revert "Revert "Notifications ux fixes - wip (#383)""
This reverts commit 699b03eb42
.
* Group & provide more control over notification display
* UI/UX improvements
* Remove unused text key
* Refactor
* Refactor
* Show answer resolution in notification
* Disable eslint on single linefor exhaustive deps
* Handle arbritrary notifications
* Refactor
* Remove unused vars
* Add follow user
* Various UX improvements, add follow notif
* Various small ui changes
* Show notification settings breakdown
* Improve notification status lines
45 lines
992 B
TypeScript
45 lines
992 B
TypeScript
export type Notification = {
|
|
id: string
|
|
userId: string
|
|
reasonText?: string
|
|
reason?: notification_reason_types
|
|
createdTime: number
|
|
viewTime?: number
|
|
isSeen: boolean
|
|
|
|
sourceId?: string
|
|
sourceType?: notification_source_types
|
|
sourceUpdateType?: notification_source_update_types
|
|
sourceContractId?: string
|
|
sourceUserName?: string
|
|
sourceUserUsername?: string
|
|
sourceUserAvatarUrl?: string
|
|
}
|
|
export type notification_source_types =
|
|
| 'contract'
|
|
| 'comment'
|
|
| 'bet'
|
|
| 'answer'
|
|
| 'liquidity'
|
|
| 'follow'
|
|
| 'tip'
|
|
| 'admin_message'
|
|
|
|
export type notification_source_update_types =
|
|
| 'created'
|
|
| 'updated'
|
|
| 'resolved'
|
|
| 'deleted'
|
|
| 'closed'
|
|
|
|
export type notification_reason_types =
|
|
| 'tagged_user'
|
|
| 'on_users_contract'
|
|
| 'on_contract_with_users_shares_in'
|
|
| 'on_contract_with_users_shares_out'
|
|
| 'on_contract_with_users_answer'
|
|
| 'on_contract_with_users_comment'
|
|
| 'reply_to_users_answer'
|
|
| 'reply_to_users_comment'
|
|
| 'on_new_follow'
|