mirror of
https://github.com/spliit-app/spliit.git
synced 2026-03-09 13:49:04 +01:00
Use tRPC for group create form (#250)
This commit is contained in:
committed by
GitHub
parent
210c12b7ef
commit
2281316d58
@@ -5,16 +5,9 @@ import { trpc } from '@/trpc/client'
|
||||
|
||||
export const EditGroup = ({ groupId }: { groupId: string }) => {
|
||||
const { data, isLoading } = trpc.groups.get.useQuery({ groupId })
|
||||
const { mutateAsync, isPending } = trpc.groups.update.useMutation()
|
||||
const { mutateAsync } = trpc.groups.update.useMutation()
|
||||
const utils = trpc.useUtils()
|
||||
|
||||
// async function updateGroupAction(values: unknown, participantId?: string) {
|
||||
// 'use server'
|
||||
// const groupFormValues = groupFormSchema.parse(values)
|
||||
// const group = await updateGroup(groupId, groupFormValues, participantId)
|
||||
// redirect(`/groups/${group.id}`)
|
||||
// }
|
||||
|
||||
if (isLoading) return <></>
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user