fix: add team bio to public page (#1265)
This commit is contained in:
parent
ec2acedf34
commit
db7711869f
1 changed files with 37 additions and 32 deletions
|
@ -17,7 +17,6 @@ import Team from "@components/team/screens/Team";
|
||||||
import Avatar from "@components/ui/Avatar";
|
import Avatar from "@components/ui/Avatar";
|
||||||
import AvatarGroup from "@components/ui/AvatarGroup";
|
import AvatarGroup from "@components/ui/AvatarGroup";
|
||||||
import Button from "@components/ui/Button";
|
import Button from "@components/ui/Button";
|
||||||
import Text from "@components/ui/Text";
|
|
||||||
|
|
||||||
function TeamPage({ team }: inferSSRProps<typeof getServerSideProps>) {
|
function TeamPage({ team }: inferSSRProps<typeof getServerSideProps>) {
|
||||||
const { isReady } = useTheme();
|
const { isReady } = useTheme();
|
||||||
|
@ -61,10 +60,14 @@ function TeamPage({ team }: inferSSRProps<typeof getServerSideProps>) {
|
||||||
isReady && (
|
isReady && (
|
||||||
<div>
|
<div>
|
||||||
<HeadSeo title={teamName} description={teamName} />
|
<HeadSeo title={teamName} description={teamName} />
|
||||||
<div className="pt-24 pb-12 px-4">
|
<div className="h-screen bg-neutral-50 dark:bg-black">
|
||||||
|
<main className="max-w-3xl px-4 py-24 mx-auto">
|
||||||
<div className="mb-8 text-center">
|
<div className="mb-8 text-center">
|
||||||
<Avatar alt={teamName} imageSrc={team.logo} className="mx-auto w-20 h-20 rounded-full mb-4" />
|
<Avatar alt={teamName} imageSrc={team.logo} className="mx-auto w-20 h-20 rounded-full mb-4" />
|
||||||
<Text variant="headline">{teamName}</Text>
|
<h1 className="mb-1 text-3xl font-bold font-cal text-neutral-900 dark:text-white">
|
||||||
|
{teamName}
|
||||||
|
</h1>
|
||||||
|
<p className="text-neutral-500 dark:text-white">{team.bio}</p>
|
||||||
</div>
|
</div>
|
||||||
{(showMembers.isOn || !team.eventTypes.length) && <Team team={team} />}
|
{(showMembers.isOn || !team.eventTypes.length) && <Team team={team} />}
|
||||||
{!showMembers.isOn && team.eventTypes.length > 0 && (
|
{!showMembers.isOn && team.eventTypes.length > 0 && (
|
||||||
|
@ -93,6 +96,7 @@ function TeamPage({ team }: inferSSRProps<typeof getServerSideProps>) {
|
||||||
</aside>
|
</aside>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
</main>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
@ -116,6 +120,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
|
||||||
name: true,
|
name: true,
|
||||||
slug: true,
|
slug: true,
|
||||||
logo: true,
|
logo: true,
|
||||||
|
bio: true,
|
||||||
members: {
|
members: {
|
||||||
select: {
|
select: {
|
||||||
user: {
|
user: {
|
||||||
|
|
Loading…
Reference in a new issue