feat(gmw): public features #7-14 — scam domains, top channels, hourly heatmap, category drill-down, coverage stats, channel culture glossary, term KB, edit history
ALSO fixes: dashboard.repository still JOINed dropped user_reputations table (listUsers/getUserDetail crash).
This commit is contained in:
@@ -5,6 +5,7 @@ import { messagesApi, voiceApi } from "@/lib/api";
|
||||
import type {
|
||||
AttachmentRecord,
|
||||
Channel,
|
||||
EditHistoryRow,
|
||||
MessageActivityBucket,
|
||||
MessageRecord,
|
||||
SemanticSearchResult,
|
||||
@@ -381,3 +382,15 @@ export function useMessageActivity(days = 30) {
|
||||
messagesApi.getActivity(days),
|
||||
);
|
||||
}
|
||||
|
||||
export function useRecentEdits(
|
||||
limit = 50,
|
||||
channelId?: string,
|
||||
initialData?: EditHistoryRow[],
|
||||
) {
|
||||
return useSWR<EditHistoryRow[]>(
|
||||
["recent-edits", limit, channelId ?? null],
|
||||
() => messagesApi.getRecentEdits(limit, channelId),
|
||||
{ fallbackData: initialData },
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user