We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27f7068 commit 4a410c8Copy full SHA for 4a410c8
src/client/routes/worker/$workerId/index.tsx
@@ -82,6 +82,7 @@ function PageComponent() {
82
const [activePreviewParams, setActivePreviewParams] = useState<UrlParam[]>([
83
{ key: '', value: '' },
84
]);
85
+ const trpcUtils = trpc.useUtils();
86
87
const {
88
data: worker,
@@ -136,12 +137,15 @@ function PageComponent() {
136
137
});
138
139
const handleDelete = useEvent(async () => {
- if (!worker) return;
140
+ if (!worker) {
141
+ return;
142
+ }
143
144
await deleteMutation.mutateAsync({
145
workspaceId,
146
workerId: worker.id,
147
148
+ trpcUtils.worker.all.invalidate();
149
150
navigate({
151
to: '/worker',
0 commit comments