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

@@ -16,7 +16,7 @@ import Link from 'next/link'
export default function GroupInformation({ groupId }: { groupId: string }) {
const t = useTranslations('Information')
const { data, isLoading } = trpc.groups.information.get.useQuery({ groupId })
const { data, isLoading } = trpc.groups.get.useQuery({ groupId })
return (
<>
@@ -41,7 +41,7 @@ export default function GroupInformation({ groupId }: { groupId: string }) {
<Skeleton className="h-3 w-1/2" />
</div>
) : (
data.information || (
data.group.information || (
<p className="text-muted-foreground text-sm">{t('empty')}</p>
)
)}