2026-08-07 10:44:03 +07:00
|
|
|
/**
|
|
|
|
|
* Voice page — Server Component.
|
|
|
|
|
*
|
|
|
|
|
* Fetches the authoritative voice connection status + guild list on the server
|
|
|
|
|
* so the first paint reflects the shared gateway voice state (which channel is
|
|
|
|
|
* joined, across ALL users), independent of any single browser's WS history.
|
|
|
|
|
*/
|
|
|
|
|
import { getGuilds, getVoiceStatus } from "@/lib/api/server";
|
|
|
|
|
import VoiceView from "./view";
|
2026-07-26 15:34:08 +07:00
|
|
|
|
2026-08-07 10:44:03 +07:00
|
|
|
export default async function VoicePage() {
|
|
|
|
|
const [status, guilds] = await Promise.allSettled([
|
|
|
|
|
getVoiceStatus(),
|
|
|
|
|
getGuilds(),
|
|
|
|
|
]);
|
2026-07-26 15:34:08 +07:00
|
|
|
|
|
|
|
|
return (
|
2026-08-07 10:44:03 +07:00
|
|
|
<VoiceView
|
|
|
|
|
initialStatus={status.status === "fulfilled" ? status.value : undefined}
|
|
|
|
|
initialGuilds={guilds.status === "fulfilled" ? guilds.value : undefined}
|
|
|
|
|
/>
|
2026-07-26 15:34:08 +07:00
|
|
|
);
|
|
|
|
|
}
|