-
{i18n()('general.loading')}
+
{i18n()('general.loading')}
0}>
{profile()?.display_name}
@@ -387,7 +387,7 @@ const ProfileDisplay: Component
= (props) => {
}
>
-
+
diff --git a/src/components/modal/ProfileEdit.tsx b/src/components/modal/ProfileEdit.tsx
index c911941..5217666 100644
--- a/src/components/modal/ProfileEdit.tsx
+++ b/src/components/modal/ProfileEdit.tsx
@@ -50,7 +50,7 @@ const ProfileEdit: Component = (props) => {
);
const { updateProfile } = useCommands();
- const mutation = createMutation({
+ const mutation = createMutation(() => ({
mutationKey: ['updateProfile'],
mutationFn: (...params: Parameters) =>
updateProfile(...params).then((promeses) => Promise.allSettled(promeses.map(timeout(10000)))),
@@ -73,12 +73,12 @@ const ProfileEdit: Component = (props) => {
onError: (err) => {
console.error('failed to delete', err);
},
- });
+ }));
- const loading = () => query.isLoading || mutation.isLoading;
+ const loading = () => query.isPending || mutation.isPending;
const disabled = () => loading();
- setInterval(() => console.log(query.isLoading, mutation.isLoading), 1000);
+ setInterval(() => console.log(query.isPending, mutation.isPending), 1000);
const otherProperties = () =>
omit(profile(), [
@@ -313,7 +313,7 @@ const ProfileEdit: Component = (props) => {
@@ -325,7 +325,7 @@ const ProfileEdit: Component = (props) => {
{i18n()('profile.edit.cancel')}