mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-06 04:31:50 +02:00
♻️ Improve query invalidation (#659)
This commit is contained in:
parent
0ad5abb590
commit
5b6d8424af
6 changed files with 21 additions and 26 deletions
|
@ -95,8 +95,10 @@ const ChangeNameModal = (props: {
|
|||
onDone: () => void;
|
||||
}) => {
|
||||
const posthog = usePostHog();
|
||||
const queryClient = trpc.useContext();
|
||||
const changeName = trpc.polls.participants.rename.useMutation({
|
||||
onSuccess: (_, { participantId, newName }) => {
|
||||
queryClient.polls.participants.invalidate();
|
||||
posthog?.capture("changed name", {
|
||||
participantId,
|
||||
oldName: props.oldName,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue