diff --git a/apps/nextjs/src/app/[locale]/auth/login/_login-form.tsx b/apps/nextjs/src/app/[locale]/auth/login/_login-form.tsx index 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.tsx index 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) => { <>