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:
@@ -1,5 +1,10 @@
|
||||
import { PageTransition } from "@/components/shared";
|
||||
import { getConfig, getGuilds, getMessages } from "@/lib/api/server";
|
||||
import {
|
||||
getConfig,
|
||||
getGuilds,
|
||||
getMessages,
|
||||
getRecentEdits,
|
||||
} from "@/lib/api/server";
|
||||
import { MessagesView } from "./view";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
@@ -11,12 +16,14 @@ export default async function MessagesPage() {
|
||||
data: import("@/lib/types").MessageRecord[];
|
||||
nextCursor: string | null;
|
||||
} | null = null;
|
||||
let initialEdits: import("@/lib/types").EditHistoryRow[] | undefined;
|
||||
try {
|
||||
[config, guilds] = await Promise.all([getConfig(), getGuilds()]);
|
||||
const gid = config?.monitorGuildId;
|
||||
if (gid) {
|
||||
initialMessages = await getMessages(gid, undefined, 50);
|
||||
}
|
||||
initialEdits = await getRecentEdits(50);
|
||||
} catch {
|
||||
/* client hooks surface errors */
|
||||
}
|
||||
@@ -26,6 +33,7 @@ export default async function MessagesPage() {
|
||||
initialGuilds={guilds}
|
||||
initialGuildId={config?.monitorGuildId ?? null}
|
||||
initialMessages={initialMessages}
|
||||
initialEdits={initialEdits}
|
||||
/>
|
||||
</PageTransition>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user