mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-26 13:17:15 -05:00
19 lines
463 B
TypeScript
19 lines
463 B
TypeScript
import * as React from "react";
|
|
import { Placeholder } from "../Placeholder";
|
|
|
|
const ChatSidebar = React.lazy(() =>
|
|
import("./ChatSidebar").then((module) => ({ default: module.ChatSidebar })),
|
|
);
|
|
|
|
export function preloadChatSidebar() {
|
|
void import("./ChatSidebar");
|
|
}
|
|
|
|
export function LazyChatSidebar({ onClose }: { onClose?: () => void }) {
|
|
return (
|
|
<React.Suspense fallback={<Placeholder />}>
|
|
<ChatSidebar onClose={onClose} />
|
|
</React.Suspense>
|
|
);
|
|
}
|