diff --git a/apps/web/src/app/[locale]/(space)/settings/profile/page.tsx b/apps/web/src/app/[locale]/(space)/settings/profile/page.tsx index bbed6b9ab..a78afb3af 100644 --- a/apps/web/src/app/[locale]/(space)/settings/profile/page.tsx +++ b/apps/web/src/app/[locale]/(space)/settings/profile/page.tsx @@ -1,11 +1,12 @@ -import type { Params } from "@/app/[locale]/types"; -import { getTranslation } from "@/i18n/server"; - -import { getUser } from "@/data/get-user"; import { Button } from "@rallly/ui/button"; import { DialogTrigger } from "@rallly/ui/dialog"; import { TrashIcon } from "lucide-react"; + +import type { Params } from "@/app/[locale]/types"; import { Trans } from "@/components/trans"; +import { getUser } from "@/data/get-user"; +import { getTranslation } from "@/i18n/server"; + import { SettingsContent, SettingsSection, diff --git a/apps/web/src/app/[locale]/(space)/settings/profile/profile-picture.tsx b/apps/web/src/app/[locale]/(space)/settings/profile/profile-picture.tsx index 19be356f9..cb26c8fde 100644 --- a/apps/web/src/app/[locale]/(space)/settings/profile/profile-picture.tsx +++ b/apps/web/src/app/[locale]/(space)/settings/profile/profile-picture.tsx @@ -78,7 +78,7 @@ function ChangeAvatarButton({ onSuccess }: { onSuccess: () => void }) { }); onSuccess(); - } catch (error) { + } catch { toast({ title: t("errorUploadPicture", { defaultValue: "Failed to upload", diff --git a/apps/web/src/app/[locale]/(space)/settings/profile/profile-settings.tsx b/apps/web/src/app/[locale]/(space)/settings/profile/profile-settings.tsx index 5b16b4c56..b647d3461 100644 --- a/apps/web/src/app/[locale]/(space)/settings/profile/profile-settings.tsx +++ b/apps/web/src/app/[locale]/(space)/settings/profile/profile-settings.tsx @@ -10,6 +10,7 @@ import { FormMessage, } from "@rallly/ui/form"; import { Input } from "@rallly/ui/input"; +import { useRouter } from "next/navigation"; import { useForm } from "react-hook-form"; import { z } from "zod"; @@ -17,7 +18,6 @@ import { Trans } from "@/components/trans"; import { trpc } from "@/trpc/client"; import { ProfilePicture } from "./profile-picture"; -import { useRouter } from "next/navigation"; const profileSettingsFormData = z.object({ name: z.string().min(1).max(100), diff --git a/apps/web/src/components/user-provider.tsx b/apps/web/src/components/user-provider.tsx index 06781e41a..8a95666bf 100644 --- a/apps/web/src/components/user-provider.tsx +++ b/apps/web/src/components/user-provider.tsx @@ -1,5 +1,6 @@ "use client"; import { usePostHog } from "@rallly/posthog/client"; +import { useRouter } from "next/navigation"; import type { Session } from "next-auth"; import { signOut, useSession } from "next-auth/react"; import React from "react"; @@ -11,7 +12,6 @@ import { trpc } from "@/trpc/client"; import { isOwner } from "@/utils/permissions"; import { useRequiredContext } from "./use-required-context"; -import { useRouter } from "next/navigation"; type UserData = { id?: string;