feat: trpc v10 migration (#5332)

* migrate router

* createTRPCReact

* frontend 1

* random format change

* frontend 2

* withQuery

* form router

* TS-ERROR: proxy on utils-client

* inferance

* ssg

* reuse

* trpc rc4

* Apply suggestions from code review

* skip test

* move skip one level up

* whops

* rc 6 with new setData func

Co-authored-by: zomars <[email protected]>
This commit is contained in:
Julius Marmingeandzomars authored and GitHub committed 2022-11-10 23:40:01 +00:00
1 parent 6d67808627
commit db7c3fb52f
157 files changed
+3062 -3144

No files matched your search

@@ -9,13 +9,13 @@ const DisableUserImpersonation = ({ disableImpersonation }: { disableImpersonati
const { t } = useLocale();
const mutation = trpc.useMutation("viewer.updateProfile", {
const mutation = trpc.viewer.updateProfile.useMutation({
onSuccess: async () => {
showToast(t("your_user_profile_updated_successfully"), "success");
await utils.invalidateQueries(["viewer.me"]);
await utils.viewer.me.invalidate();
},
async onSettled() {
await utils.invalidateQueries(["viewer.public.i18n"]);
await utils.viewer.public.i18n.invalidate();
},
});