MCPcopy Create free account
hub / github.com/Botloader/botloader / GuildPagesWrapper

Function GuildPagesWrapper

frontend/src/pages/servers/index.tsx:56–77  ·  view source on GitHub ↗
({ children }: { children: React.ReactNode })

Source from the content-addressed store, hash-verified

54
55
56export function GuildPagesWrapper({ children }: { children: React.ReactNode }) {
57 let guild = useCurrentGuild();
58 if (guild?.loading || guild?.waiting) {
59 return <Loading />
60 }
61
62 if (guild?.value) {
63 if (guild.value.connected) {
64 return <>
65 {children}
66 </>
67 } else {
68 return <div className="page-wrapper">
69 <InviteGuildPage guild={guild.value} />
70 </div>
71 }
72 } else {
73 return <div className="page-wrapper">
74 <NoGuildPage />
75 </div>
76 }
77}
78
79
80function InviteGuildPage(props: { guild: BotGuild }) {

Callers

nothing calls this directly

Calls 1

useCurrentGuildFunction · 0.90

Tested by

no test coverage detected