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