Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
lukevella committed Nov 24, 2024
1 parent 1aab54d commit 5503470
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 0 additions & 3 deletions apps/web/src/components/discussion/discussion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,6 @@ function DiscussionInner() {

const { data: comments } = trpc.polls.comments.list.useQuery(
{ pollId },
{
staleTime: 1000 * 5,
},
);
const posthog = usePostHog();

Expand Down
8 changes: 8 additions & 0 deletions apps/web/src/trpc/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,12 @@ export const trpc = createTRPCNext<AppRouter>({
config() {
return trpcConfig;
},
unstable_overrides: {
useMutation: {
async onSuccess(opts) {
await opts.originalFn();
await opts.queryClient.invalidateQueries();
},
},
},
});

0 comments on commit 5503470

Please sign in to comment.