Fix prettier
This commit is contained in:
@@ -20,30 +20,25 @@ interface ProfileAccordionProps {
|
|||||||
|
|
||||||
export const ProfileAccordion = ({ user }: ProfileAccordionProps) => {
|
export const ProfileAccordion = ({ user }: ProfileAccordionProps) => {
|
||||||
const t = useI18n();
|
const t = useI18n();
|
||||||
const { mutate, isPending } =
|
const { mutate, isPending } = clientApi.user.editProfile.useMutation({
|
||||||
clientApi.user.editProfile.useMutation({
|
onError(error) {
|
||||||
onError(error) {
|
showErrorNotification({
|
||||||
showErrorNotification({
|
title: t("management.page.user.edit.section.profile.editProfile.title"),
|
||||||
title: t(
|
message: error.message,
|
||||||
"management.page.user.edit.section.profile.editProfile.title",
|
});
|
||||||
),
|
},
|
||||||
message: error.message,
|
onSuccess: () => {
|
||||||
});
|
showSuccessNotification({
|
||||||
},
|
title: t("management.page.user.edit.section.profile.editProfile.title"),
|
||||||
onSuccess: () => {
|
message: t(
|
||||||
showSuccessNotification({
|
"management.page.user.edit.section.profile.editProfile.message.profileUpdated",
|
||||||
title: t(
|
),
|
||||||
"management.page.user.edit.section.profile.editProfile.title",
|
});
|
||||||
),
|
},
|
||||||
message: t(
|
onSettled: async () => {
|
||||||
"management.page.user.edit.section.profile.editProfile.message.profileUpdated",
|
await revalidatePathAction("/manage/users");
|
||||||
),
|
},
|
||||||
});
|
});
|
||||||
},
|
|
||||||
onSettled: async () => {
|
|
||||||
await revalidatePathAction("/manage/users");
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const form = useForm({
|
const form = useForm({
|
||||||
initialValues: {
|
initialValues: {
|
||||||
name: user.name ?? "",
|
name: user.name ?? "",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
|
import { useCallback, useMemo, useState } from "react";
|
||||||
import {
|
import {
|
||||||
Avatar,
|
Avatar,
|
||||||
Card,
|
Card,
|
||||||
@@ -11,7 +12,6 @@ import {
|
|||||||
Title,
|
Title,
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { IconUserCheck } from "@tabler/icons-react";
|
import { IconUserCheck } from "@tabler/icons-react";
|
||||||
import { useCallback, useMemo, useState } from "react";
|
|
||||||
|
|
||||||
import { clientApi } from "@homarr/api/client";
|
import { clientApi } from "@homarr/api/client";
|
||||||
import { useForm, zodResolver } from "@homarr/form";
|
import { useForm, zodResolver } from "@homarr/form";
|
||||||
|
|||||||
Reference in New Issue
Block a user