diff --git a/src/components/layout/header/internal/UserAuth.tsx b/src/components/layout/header/internal/UserAuth.tsx index 42e8d4343e..f9d1cc12de 100644 --- a/src/components/layout/header/internal/UserAuth.tsx +++ b/src/components/layout/header/internal/UserAuth.tsx @@ -5,8 +5,9 @@ import { AnimatePresence } from 'framer-motion' import dynamic from 'next/dynamic' import { usePathname } from 'next/navigation' -import { useIsLogged } from '~/atoms' +import { getAdminUrl, useIsLogged } from '~/atoms' import { UserArrowLeftIcon } from '~/components/icons/user-arrow-left' +import { MotionButtonBase } from '~/components/ui/button' import { FloatPopover } from '~/components/ui/float-popover' import { urlBuilder } from '~/lib/url-builder' import { useAggregationSelector } from '~/providers/root/aggregation-data-provider' @@ -34,9 +35,17 @@ const OwnerAvatar = () => { const ownerAvatar = useAggregationSelector((s) => s.user.avatar)! return ( -
+ { + const adminUrl = getAdminUrl() + if (!adminUrl) return + window.open(adminUrl, '_blank') + }} + className="pointer-events-auto flex h-10 w-10 items-center justify-center overflow-hidden rounded-full" + > + Go to dashboard site owner -
+ ) } export function UserAuth() {