Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
6895bccc
Commit
6895bccc
authored
Mar 13, 2025
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix account actions menu item click
parent
e07fd2aa
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
12 additions
and
36 deletions
+12
-36
button.tsx
toolkit/chakra/button.tsx
+1
-2
link.tsx
toolkit/chakra/link.tsx
+2
-4
AdaptiveTabsList.tsx
toolkit/components/AdaptiveTabs/AdaptiveTabsList.tsx
+3
-3
AccountActionsMenu.tsx
ui/shared/AccountActionsMenu/AccountActionsMenu.tsx
+1
-1
MetadataUpdateMenuItem.tsx
...hared/AccountActionsMenu/items/MetadataUpdateMenuItem.tsx
+2
-2
PrivateTagMenuItem.tsx
ui/shared/AccountActionsMenu/items/PrivateTagMenuItem.tsx
+1
-1
PublicTagMenuItem.tsx
ui/shared/AccountActionsMenu/items/PublicTagMenuItem.tsx
+1
-1
TokenInfoMenuItem.tsx
ui/shared/AccountActionsMenu/items/TokenInfoMenuItem.tsx
+1
-1
MenuItem.tsx
ui/shared/AccountActionsMenu/parts/MenuItem.tsx
+0
-21
No files found.
toolkit/chakra/button.tsx
View file @
6895bccc
...
@@ -51,9 +51,8 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
...
@@ -51,9 +51,8 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
})();
})();
return
(
return
(
<
Skeleton
loading=
{
loadingSkeleton
}
asChild
>
<
Skeleton
loading=
{
loadingSkeleton
}
asChild
ref=
{
ref
as
React
.
ForwardedRef
<
HTMLDivElement
>
}
>
<
ChakraButton
<
ChakraButton
ref=
{
ref
}
{
...
(
expanded
?
{
'
data
-
expanded
':
true
}
:
{})
}
{
...
(
expanded
?
{
'
data
-
expanded
':
true
}
:
{})
}
{
...
(
selected
?
{
'
data
-
selected
':
true
}
:
{})
}
{
...
(
selected
?
{
'
data
-
selected
':
true
}
:
{})
}
{
...
(
highlighted
?
{
'
data
-
highlighted
':
true
}
:
{})
}
{
...
(
highlighted
?
{
'
data
-
highlighted
':
true
}
:
{})
}
...
...
toolkit/chakra/link.tsx
View file @
6895bccc
...
@@ -54,9 +54,8 @@ export const Link = React.forwardRef<HTMLAnchorElement, LinkProps>(
...
@@ -54,9 +54,8 @@ export const Link = React.forwardRef<HTMLAnchorElement, LinkProps>(
if
(
external
)
{
if
(
external
)
{
return
(
return
(
<
Skeleton
loading=
{
loading
}
asChild
>
<
Skeleton
loading=
{
loading
}
ref=
{
ref
as
React
.
ForwardedRef
<
HTMLDivElement
>
}
asChild
>
<
ChakraLink
<
ChakraLink
ref=
{
ref
}
href=
{
href
}
href=
{
href
}
className=
"group"
className=
"group"
target=
"_blank"
target=
"_blank"
...
@@ -72,10 +71,9 @@ export const Link = React.forwardRef<HTMLAnchorElement, LinkProps>(
...
@@ -72,10 +71,9 @@ export const Link = React.forwardRef<HTMLAnchorElement, LinkProps>(
}
}
return
(
return
(
<
Skeleton
loading=
{
loading
}
asChild
>
<
Skeleton
loading=
{
loading
}
ref=
{
ref
as
React
.
ForwardedRef
<
HTMLDivElement
>
}
asChild
>
<
ChakraLink
<
ChakraLink
asChild
asChild
ref=
{
ref
}
{
...
(
disabled
?
{
'
data
-
disabled
':
true
}
:
{})
}
{
...
(
disabled
?
{
'
data
-
disabled
':
true
}
:
{})
}
{
...
rest
}
{
...
rest
}
>
>
...
...
toolkit/components/AdaptiveTabs/AdaptiveTabsList.tsx
View file @
6895bccc
...
@@ -80,14 +80,14 @@ const AdaptiveTabsList = (props: Props) => {
...
@@ -80,14 +80,14 @@ const AdaptiveTabsList = (props: Props) => {
overflowX=
{
{
base
:
'
auto
'
,
lg
:
'
initial
'
}
}
overflowX=
{
{
base
:
'
auto
'
,
lg
:
'
initial
'
}
}
overscrollBehaviorX=
"contain"
overscrollBehaviorX=
"contain"
css=
{
{
css=
{
{
'
scroll-snap-type
'
:
'
x mandatory
'
,
scrollSnapType
:
'
x mandatory
'
,
'
scroll-padding-inline
'
:
'
12px
'
,
// mobile page padding
scrollPaddingInline
:
'
12px
'
,
// mobile page padding
// hide scrollbar
// hide scrollbar
'
&::-webkit-scrollbar
'
:
{
/* Chromiums */
'
&::-webkit-scrollbar
'
:
{
/* Chromiums */
display
:
'
none
'
,
display
:
'
none
'
,
},
},
'
-ms-overflow-style
'
:
'
none
'
,
/* IE and Edge */
'
-ms-overflow-style
'
:
'
none
'
,
/* IE and Edge */
'
scrollbar-width
'
:
'
none
'
,
/* Firefox */
scrollbarWidth
:
'
none
'
,
/* Firefox */
}
}
}
}
{
{
...
(
props
.
stickyEnabled
?
{
...
(
props
.
stickyEnabled
?
{
...
...
ui/shared/AccountActionsMenu/AccountActionsMenu.tsx
View file @
6895bccc
...
@@ -77,7 +77,7 @@ const AccountActionsMenu = ({ isLoading, className, showUpdateMetadataItem }: Pr
...
@@ -77,7 +77,7 @@ const AccountActionsMenu = ({ isLoading, className, showUpdateMetadataItem }: Pr
}
}
return
(
return
(
<
MenuRoot
>
<
MenuRoot
unmountOnExit=
{
false
}
>
<
MenuTrigger
asChild
>
<
MenuTrigger
asChild
>
<
IconButton
variant=
"dropdown"
size=
"sm"
className=
{
className
}
onClick=
{
handleButtonClick
}
aria
-
label=
"Show address menu"
>
<
IconButton
variant=
"dropdown"
size=
"sm"
className=
{
className
}
onClick=
{
handleButtonClick
}
aria
-
label=
"Show address menu"
>
<
IconSvg
name=
"dots"
boxSize=
"18px"
/>
<
IconSvg
name=
"dots"
boxSize=
"18px"
/>
...
...
ui/shared/AccountActionsMenu/items/MetadataUpdateMenuItem.tsx
View file @
6895bccc
...
@@ -2,11 +2,11 @@ import React from 'react';
...
@@ -2,11 +2,11 @@ import React from 'react';
import
type
{
ItemProps
}
from
'
../types
'
;
import
type
{
ItemProps
}
from
'
../types
'
;
import
{
MenuItem
}
from
'
toolkit/chakra/menu
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
{
useMetadataUpdateContext
}
from
'
ui/tokenInstance/contexts/metadataUpdate
'
;
import
{
useMetadataUpdateContext
}
from
'
ui/tokenInstance/contexts/metadataUpdate
'
;
import
ButtonItem
from
'
../parts/ButtonItem
'
;
import
ButtonItem
from
'
../parts/ButtonItem
'
;
import
MenuItem
from
'
../parts/MenuItem
'
;
const
MetadataUpdateMenuItem
=
({
type
}:
ItemProps
)
=>
{
const
MetadataUpdateMenuItem
=
({
type
}:
ItemProps
)
=>
{
...
@@ -30,7 +30,7 @@ const MetadataUpdateMenuItem = ({ type }: ItemProps) => {
...
@@ -30,7 +30,7 @@ const MetadataUpdateMenuItem = ({ type }: ItemProps) => {
}
}
case
'
menu_item
'
:
{
case
'
menu_item
'
:
{
return
(
return
(
<
MenuItem
onClick=
{
handleClick
}
isD
isabled=
{
status
===
'
WAITING_FOR_RESPONSE
'
}
value=
"refresh-metadata"
>
<
MenuItem
onClick=
{
handleClick
}
d
isabled=
{
status
===
'
WAITING_FOR_RESPONSE
'
}
value=
"refresh-metadata"
>
<
IconSvg
name=
"refresh"
boxSize=
{
5
}
/>
<
IconSvg
name=
"refresh"
boxSize=
{
5
}
/>
<
span
>
Refresh metadata
</
span
>
<
span
>
Refresh metadata
</
span
>
</
MenuItem
>
</
MenuItem
>
...
...
ui/shared/AccountActionsMenu/items/PrivateTagMenuItem.tsx
View file @
6895bccc
...
@@ -8,6 +8,7 @@ import type { Transaction } from 'types/api/transaction';
...
@@ -8,6 +8,7 @@ import type { Transaction } from 'types/api/transaction';
import
{
getResourceKey
}
from
'
lib/api/useApiQuery
'
;
import
{
getResourceKey
}
from
'
lib/api/useApiQuery
'
;
import
getPageType
from
'
lib/mixpanel/getPageType
'
;
import
getPageType
from
'
lib/mixpanel/getPageType
'
;
import
{
MenuItem
}
from
'
toolkit/chakra/menu
'
;
import
{
useDisclosure
}
from
'
toolkit/hooks/useDisclosure
'
;
import
{
useDisclosure
}
from
'
toolkit/hooks/useDisclosure
'
;
import
AddressModal
from
'
ui/privateTags/AddressModal/AddressModal
'
;
import
AddressModal
from
'
ui/privateTags/AddressModal/AddressModal
'
;
import
TransactionModal
from
'
ui/privateTags/TransactionModal/TransactionModal
'
;
import
TransactionModal
from
'
ui/privateTags/TransactionModal/TransactionModal
'
;
...
@@ -15,7 +16,6 @@ import IconSvg from 'ui/shared/IconSvg';
...
@@ -15,7 +16,6 @@ import IconSvg from 'ui/shared/IconSvg';
import
AuthGuard
from
'
ui/snippets/auth/AuthGuard
'
;
import
AuthGuard
from
'
ui/snippets/auth/AuthGuard
'
;
import
ButtonItem
from
'
../parts/ButtonItem
'
;
import
ButtonItem
from
'
../parts/ButtonItem
'
;
import
MenuItem
from
'
../parts/MenuItem
'
;
interface
Props
extends
ItemProps
{
interface
Props
extends
ItemProps
{
entityType
?:
'
address
'
|
'
tx
'
;
entityType
?:
'
address
'
|
'
tx
'
;
...
...
ui/shared/AccountActionsMenu/items/PublicTagMenuItem.tsx
View file @
6895bccc
...
@@ -3,10 +3,10 @@ import React from 'react';
...
@@ -3,10 +3,10 @@ import React from 'react';
import
type
{
ItemProps
}
from
'
../types
'
;
import
type
{
ItemProps
}
from
'
../types
'
;
import
{
MenuItem
}
from
'
toolkit/chakra/menu
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
ButtonItem
from
'
../parts/ButtonItem
'
;
import
ButtonItem
from
'
../parts/ButtonItem
'
;
import
MenuItem
from
'
../parts/MenuItem
'
;
const
PublicTagMenuItem
=
({
hash
,
type
}:
ItemProps
)
=>
{
const
PublicTagMenuItem
=
({
hash
,
type
}:
ItemProps
)
=>
{
const
router
=
useRouter
();
const
router
=
useRouter
();
...
...
ui/shared/AccountActionsMenu/items/TokenInfoMenuItem.tsx
View file @
6895bccc
...
@@ -7,6 +7,7 @@ import type { ItemProps } from '../types';
...
@@ -7,6 +7,7 @@ import type { ItemProps } from '../types';
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
{
PAGE_TYPE_DICT
}
from
'
lib/mixpanel/getPageType
'
;
import
{
PAGE_TYPE_DICT
}
from
'
lib/mixpanel/getPageType
'
;
import
{
MenuItem
}
from
'
toolkit/chakra/menu
'
;
import
{
useDisclosure
}
from
'
toolkit/hooks/useDisclosure
'
;
import
{
useDisclosure
}
from
'
toolkit/hooks/useDisclosure
'
;
import
AddressVerificationModal
from
'
ui/addressVerification/AddressVerificationModal
'
;
import
AddressVerificationModal
from
'
ui/addressVerification/AddressVerificationModal
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
...
@@ -14,7 +15,6 @@ import AuthGuard from 'ui/snippets/auth/AuthGuard';
...
@@ -14,7 +15,6 @@ import AuthGuard from 'ui/snippets/auth/AuthGuard';
import
useIsAuth
from
'
ui/snippets/auth/useIsAuth
'
;
import
useIsAuth
from
'
ui/snippets/auth/useIsAuth
'
;
import
ButtonItem
from
'
../parts/ButtonItem
'
;
import
ButtonItem
from
'
../parts/ButtonItem
'
;
import
MenuItem
from
'
../parts/MenuItem
'
;
const
TokenInfoMenuItem
=
({
hash
,
type
}:
ItemProps
)
=>
{
const
TokenInfoMenuItem
=
({
hash
,
type
}:
ItemProps
)
=>
{
const
router
=
useRouter
();
const
router
=
useRouter
();
...
...
ui/shared/AccountActionsMenu/parts/MenuItem.tsx
deleted
100644 → 0
View file @
e07fd2aa
import
React
from
'
react
'
;
import
{
MenuItem
as
MenuItemChakra
}
from
'
toolkit/chakra/menu
'
;
interface
Props
{
className
?:
string
;
children
:
React
.
ReactNode
;
onClick
:
()
=>
void
;
value
:
string
;
isDisabled
?:
boolean
;
}
const
MenuItem
=
({
className
,
children
,
onClick
,
value
,
isDisabled
}:
Props
)
=>
{
return
(
<
MenuItemChakra
className=
{
className
}
onClick=
{
onClick
}
disabled=
{
isDisabled
}
value=
{
value
}
>
{
children
}
</
MenuItemChakra
>
);
};
export
default
MenuItem
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment