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:
@@ -0,0 +1,22 @@
|
||||
import useSWR from "swr";
|
||||
import { knowledgeApi } from "@/lib/api";
|
||||
import type { ChannelCultureRow, GlossaryRow } from "@/lib/types";
|
||||
|
||||
export function useChannelCultures(
|
||||
limit = 100,
|
||||
initialData?: ChannelCultureRow[],
|
||||
) {
|
||||
return useSWR<ChannelCultureRow[]>(
|
||||
["channel-cultures", limit],
|
||||
() => knowledgeApi.channelCultures(limit),
|
||||
{ fallbackData: initialData },
|
||||
);
|
||||
}
|
||||
|
||||
export function useGlossary(limit = 100, initialData?: GlossaryRow[]) {
|
||||
return useSWR<GlossaryRow[]>(
|
||||
["glossary", limit],
|
||||
() => knowledgeApi.glossary(limit),
|
||||
{ fallbackData: initialData },
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user