A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.
fix: login with revalidate path and wrong preferences link (#654)
Meier Lukas8e4ba37f9429
diff --git a/apps/nextjs/src/app/[locale]/auth/login/_login-form.tsx b/apps/nextjs/src/app/[locale]/auth/login/_login-form.tsxindex d0345ec72..555862a51 100644--- a/apps/nextjs/src/app/[locale]/auth/login/_login-form.tsx+++ b/apps/nextjs/src/app/[locale]/auth/login/_login-form.tsx@@ -12,6 +12,8 @@ import { useScopedI18n } from "@homarr/translation/client";import type { z } from "@homarr/validation";import { validation } from "@homarr/validation";+import { revalidatePathActionAsync } from "~/app/revalidatePathAction";+export const LoginForm = () => {const t = useScopedI18n("user");const router = useRouter();@@ -32,7 +34,7 @@ export const LoginForm = () => {redirect: false,callbackUrl: "/",})- .then((response) => {+ .then(async (response) => {if (!response?.ok || response.error) {throw response?.error;}@@ -41,6 +43,7 @@ export const LoginForm = () => {title: t("action.login.notification.success.title"),message: t("action.login.notification.success.message"),});+ await revalidatePathActionAsync("/");router.push("/");}).catch((error: Error | string) => {diff --git a/apps/nextjs/src/components/user-avatar-menu.tsx b/apps/nextjs/src/components/user-avatar-menu.tsxindex 0cd5e0726..f8be743e6 100644--- a/apps/nextjs/src/components/user-avatar-menu.tsx+++ b/apps/nextjs/src/components/user-avatar-menu.tsx@@ -72,7 +72,7 @@ export const UserAvatarMenu = ({ children }: UserAvatarMenuProps) => {<><Menu.Itemcomponent={Link}- href={`/manage/users/${session.data?.user.id}`}+ href={`/manage/users/${session.data?.user.id}/general`}leftSection={<IconSettings size="1rem" />}>{t("preferences")}