v3: code quality pass, various bug fixes
This commit is contained in:
@@ -5,6 +5,7 @@ import type {
|
||||
Notification,
|
||||
OnlineUser,
|
||||
Playlist,
|
||||
PublicUser,
|
||||
} from "../model.ts";
|
||||
|
||||
export interface VoteEvent {
|
||||
@@ -28,6 +29,10 @@ export interface CommentEvent {
|
||||
commentId?: string;
|
||||
}
|
||||
|
||||
export interface UserEvent {
|
||||
user: PublicUser;
|
||||
}
|
||||
|
||||
export interface WSContextValue {
|
||||
onlineUsers: OnlineUser[];
|
||||
voteCounts: Record<string, number>;
|
||||
@@ -39,6 +44,7 @@ export interface WSContextValue {
|
||||
lastPlaylistEvent: PlaylistEvent | null;
|
||||
deletedPlaylistIds: Set<string>;
|
||||
lastCommentEvent: CommentEvent | null;
|
||||
lastUserEvent: UserEvent | null;
|
||||
unreadNotificationCount: number;
|
||||
lastNotification: Notification | null;
|
||||
castVote: (dumpId: string) => void;
|
||||
@@ -58,6 +64,7 @@ export const WSContext = createContext<WSContextValue>({
|
||||
lastPlaylistEvent: null,
|
||||
deletedPlaylistIds: new Set(),
|
||||
lastCommentEvent: null,
|
||||
lastUserEvent: null,
|
||||
unreadNotificationCount: 0,
|
||||
lastNotification: null,
|
||||
castVote: () => {},
|
||||
|
||||
Reference in New Issue
Block a user