diff --git a/apps/nextjs/src/components/layout/header/user.tsx b/apps/nextjs/src/components/layout/header/user.tsx index 6ec2cf306..720b229c8 100644 --- a/apps/nextjs/src/components/layout/header/user.tsx +++ b/apps/nextjs/src/components/layout/header/user.tsx @@ -6,6 +6,7 @@ import { auth } from "@homarr/auth/next"; import { CurrentUserAvatar } from "~/components/user-avatar"; import { UserAvatarMenu } from "~/components/user-avatar-menu"; +import { SurveyIndicator } from "./survey"; import { UpdateIndicator } from "./update"; export const UserButton = async () => { @@ -16,9 +17,11 @@ export const UserButton = async () => { }> - - - + + + + + diff --git a/apps/nextjs/src/components/user-avatar-menu.tsx b/apps/nextjs/src/components/user-avatar-menu.tsx index 71ec2b218..c24924f6e 100644 --- a/apps/nextjs/src/components/user-avatar-menu.tsx +++ b/apps/nextjs/src/components/user-avatar-menu.tsx @@ -18,6 +18,7 @@ import { useAuthContext } from "~/app/[locale]/_client-providers/session"; import { CurrentColorSchemeCombobox } from "./color-scheme/current-color-scheme-combobox"; import { CurrentLanguageCombobox } from "./language/current-language-combobox"; import { AvailableUpdatesMenuItem } from "./layout/header/update"; +import { SurveyMenuItem, SurveyModal } from "./layout/header/survey"; interface UserAvatarMenuProps { children: ReactNode; @@ -51,50 +52,54 @@ export const UserAvatarMenu = ({ children, availableUpdatesPromise }: UserAvatar }, [logoutUrl, openModal, router]); return ( - // We use keepMounted so we can add event listeners to prevent navigating away without saving the board - - - - }> - {t("homeBoard")} - - - - - - - - - - - {Boolean(session.data) && ( - <> - } - > - {t("preferences")} - - - }> - {t("management")} - - - )} - - {session.status === "authenticated" ? ( - } color="red"> - {t("logout")} + <> + + {/* We use keepMounted so we can add event listeners to prevent navigating away without saving the board */} + + + + + }> + {t("homeBoard")} - ) : ( - }> - {t("login")} + + + + - )} - - {children} - + + + + + {Boolean(session.data) && ( + <> + } + > + {t("preferences")} + + + }> + {t("management")} + + + )} + + {session.status === "authenticated" ? ( + } color="red"> + {t("logout")} + + ) : ( + }> + {t("login")} + + )} + + {children} + + ); };