Use tRPC in other group pages (#249)

* Use tRPC in group edition + group layout

* Use tRPC in group modals

* Use tRPC in group stats

* Use tRPC in group activity
This commit is contained in:
Sebastien Castiel
2024-10-19 21:29:53 -04:00
committed by GitHub
parent 66e15e419e
commit 210c12b7ef
35 changed files with 709 additions and 498 deletions

View File

@@ -1,11 +1,9 @@
import { cached } from '@/app/cached-functions'
import { GroupTabs } from '@/app/groups/[groupId]/group-tabs'
import { GroupHeader } from '@/app/groups/[groupId]/group-header'
import { SaveGroupLocally } from '@/app/groups/[groupId]/save-recent-group'
import { ShareButton } from '@/app/groups/[groupId]/share-button'
import { Metadata } from 'next'
import Link from 'next/link'
import { notFound } from 'next/navigation'
import { PropsWithChildren, Suspense } from 'react'
import { PropsWithChildren } from 'react'
type Props = {
params: {
@@ -35,18 +33,7 @@ export default async function GroupLayout({
return (
<>
<div className="flex flex-col justify-between gap-3">
<h1 className="font-bold text-2xl">
<Link href={`/groups/${groupId}`}>{group.name}</Link>
</h1>
<div className="flex gap-2 justify-between">
<Suspense>
<GroupTabs groupId={groupId} />
</Suspense>
<ShareButton group={group} />
</div>
</div>
<GroupHeader groupId={groupId} />
{children}