MCPcopy Create free account
hub / github.com/AnswerOverflow/AnswerOverflow / CommunityPage

Function CommunityPage

packages/ui/src/pages/CommunityPage.tsx:134–302  ·  view source on GitHub ↗
(
	props: CommunityPageData & {
		tenant: ServerPublic | undefined;
		selectedChannel:
			| Pick<CommunityPageData, 'channels'>['channels'][number]
			| undefined;
		page: number | undefined;
		uwu?: boolean;
	},
)

Source from the content-addressed store, hash-verified

132 </div>
133);
134export const CommunityPage = (
135 props: CommunityPageData & {
136 tenant: ServerPublic | undefined;
137 selectedChannel:
138 | Pick<CommunityPageData, 'channels'>['channels'][number]
139 | undefined;
140 page: number | undefined;
141 uwu?: boolean;
142 },
143) => {
144 const { server, channels, selectedChannel, tenant, posts: questions } = props;
145 // useTrackEvent('Community Page View', serverToAnalyticsData(server));
146 const { page = 0 } = props;
147 const isNuxtUwu = server.id === '473401852243869706' && props.uwu;
148 const HeroArea = () => {
149 return (
150 <div className="flex flex-col">
151 <div className="m-auto flex w-full flex-row rounded-sm bg-gradient-to-r from-[#7196CD] to-[#82adbe] px-4 py-8 dark:to-[#113360] sm:px-8 xl:px-[7rem] xl:py-16 2xl:py-20">
152 <div className={'mx-auto flex flex-row gap-4'}>
153 {isNuxtUwu ? (
154 <Image
155 src="/uwu/nuxt.png"
156 width={300}
157 height={168}
158 alt="Uwuified Nuxt Logo"
159 className="hidden sm:flex"
160 />
161 ) : (
162 <ServerIcon
163 server={server}
164 size={128}
165 className="hidden sm:flex"
166 />
167 )}
168
169 <div>
170 <Heading.H1 className="hidden pt-0 md:block">
171 {server.name}
172 </Heading.H1>
173 <div className={'hidden md:block'}>
174 <Heading.H2 className="text-xl font-normal">
175 {getServerDescription(server)}
176 </Heading.H2>
177 <ServerInviteJoinButton
178 className="mx-auto mt-2 w-fit px-10 text-lg sm:mx-0"
179 server={server}
180 location={'Community Page'}
181 channel={selectedChannel}
182 />
183 </div>
184 </div>
185 <div className="flex w-full flex-col items-center text-center md:hidden">
186 {isNuxtUwu && (
187 <Image
188 src="/uwu/nuxt.png"
189 width={300 / 1.5}
190 height={168 / 1.5}
191 alt="Uwuified Nuxt Logo"

Callers

nothing calls this directly

Calls 2

serverToAnalyticsDataFunction · 0.90
cnFunction · 0.90

Tested by

no test coverage detected