File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,9 @@ import { AnimatePresence } from 'framer-motion'
5
5
import dynamic from 'next/dynamic'
6
6
import { usePathname } from 'next/navigation'
7
7
8
- import { useIsLogged } from '~/atoms'
8
+ import { getAdminUrl , useIsLogged } from '~/atoms'
9
9
import { UserArrowLeftIcon } from '~/components/icons/user-arrow-left'
10
+ import { MotionButtonBase } from '~/components/ui/button'
10
11
import { FloatPopover } from '~/components/ui/float-popover'
11
12
import { urlBuilder } from '~/lib/url-builder'
12
13
import { useAggregationSelector } from '~/providers/root/aggregation-data-provider'
@@ -34,9 +35,17 @@ const OwnerAvatar = () => {
34
35
const ownerAvatar = useAggregationSelector ( ( s ) => s . user . avatar ) !
35
36
36
37
return (
37
- < div className = "pointer-events-auto flex h-10 w-10 items-center justify-center overflow-hidden rounded-full" >
38
+ < MotionButtonBase
39
+ onClick = { ( ) => {
40
+ const adminUrl = getAdminUrl ( )
41
+ if ( ! adminUrl ) return
42
+ window . open ( adminUrl , '_blank' )
43
+ } }
44
+ className = "pointer-events-auto flex h-10 w-10 items-center justify-center overflow-hidden rounded-full"
45
+ >
46
+ < span className = "sr-only" > Go to dashboard</ span >
38
47
< img src = { ownerAvatar } alt = "site owner" />
39
- </ div >
48
+ </ MotionButtonBase >
40
49
)
41
50
}
42
51
export function UserAuth ( ) {
You can’t perform that action at this time.
0 commit comments