fix: pass team id to vanilla trpc client

This commit is contained in:
Mythie
2025-01-20 09:30:36 +11:00
parent 0d3864548c
commit 9de3a32ceb
2 changed files with 32 additions and 3 deletions

View File

@ -50,9 +50,16 @@ export const DataTableActionButton = ({ row, team }: DataTableActionButtonProps)
const onDownloadClick = async () => {
try {
const document = !recipient
? await trpcClient.document.getDocumentById.query({
documentId: row.id,
})
? await trpcClient.document.getDocumentById.query(
{
documentId: row.id,
},
{
context: {
teamId: team?.id?.toString(),
},
},
)
: await trpcClient.document.getDocumentByToken.query({
token: recipient.token,
});