2026-08-15 17:53:48 +07:00
|
|
|
import { getConfig, getGuilds } from "@/lib/api/server";
|
|
|
|
|
import { MessagesView } from "./view";
|
2026-07-26 11:27:21 +07:00
|
|
|
|
2026-08-15 17:53:48 +07:00
|
|
|
export const dynamic = "force-dynamic";
|
2026-08-07 10:44:03 +07:00
|
|
|
|
2026-08-15 17:53:48 +07:00
|
|
|
export default async function MessagesPage() {
|
2026-08-15 20:03:55 +07:00
|
|
|
let config: import("@/lib/types/guild").AppConfig | undefined;
|
|
|
|
|
let guilds: import("@/lib/types").Guild[] | undefined;
|
2026-08-15 17:53:48 +07:00
|
|
|
try {
|
|
|
|
|
[config, guilds] = await Promise.all([getConfig(), getGuilds()]);
|
|
|
|
|
} catch {
|
|
|
|
|
/* client hooks surface errors */
|
2026-08-07 10:44:03 +07:00
|
|
|
}
|
2026-08-15 20:03:55 +07:00
|
|
|
return (
|
|
|
|
|
<MessagesView
|
|
|
|
|
initialGuilds={guilds}
|
|
|
|
|
initialGuildId={config?.monitorGuildId ?? null}
|
|
|
|
|
/>
|
|
|
|
|
);
|
2026-07-26 11:27:21 +07:00
|
|
|
}
|