Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/components/BalanceUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ export default function BalanceUI({
balance !== ('GenericFetchError' as GetBalanceError) &&
token.name &&
(onBalanceClick ? (
<span
<button
type="button"
className="cursor-pointer hover:underline"
onClick={() => onBalanceClick(Number(BigNumber(balance).dividedBy(`1e${token.decimals}`)))} // ADD
onClick={() => onBalanceClick(Number(BigNumber(balance).dividedBy(`1e${token.decimals}`)))}
>
<span className="font-medium font-mono">{` ${Number(
BigNumber(balance).dividedBy(`1e${token.decimals}`)
Expand All @@ -113,7 +114,7 @@ export default function BalanceUI({
${token.name == 'SCRT' && isSecretToken ? 's' : ''}${token.name} ${
token.coingecko_id && currencyPriceString && showCurrencyEquiv ? ` (${currencyPriceString})` : ''
}`}</span>
</span>
</button>
) : (
<>
<span className="font-medium font-mono">{` ${Number(
Expand Down
2 changes: 2 additions & 0 deletions src/components/Settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ function Settings() {
</Modal>
<div>
<button
type="button"
aria-label="Open settings"
onClick={() => setIsModalOpen(true)}
className="text-black dark:text-white hover:text-neutral-600 dark:hover:text-neutral-400 transition-colors"
>
Expand Down
18 changes: 12 additions & 6 deletions src/components/Wallet/Wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,16 @@ function Wallet() {
</Modal>

{isConnected ? (
<div onClick={() => setIsMenuOpen(true)} ref={refs.setReference}>
<>
<button
type="button"
onClick={() => setIsMenuOpen((open) => !open)}
ref={refs.setReference}
aria-haspopup="dialog"
aria-expanded={isMenuOpen}
>
<X />
</button>
{isMenuOpen && (
<div
className="w-full sm:w-auto px-4 sm:px-0 z-40"
Expand All @@ -275,12 +284,9 @@ function Wallet() {
<ContextMenu />
</div>
)}
<div>
<X />
</div>
</div>
</>
) : (
<button onClick={() => handleConnectWallet()}>
<button type="button" onClick={() => handleConnectWallet()}>
<X />
</button>
)}
Expand Down
7 changes: 6 additions & 1 deletion src/layouts/DefaultLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const DefaultLayout = ({ children }: any) => {
{icon}
{message}
{t.type !== 'loading' && (
<button onClick={() => toast.dismiss(t.id)}>
<button type="button" aria-label="Dismiss notification" onClick={() => toast.dismiss(t.id)}>
<FontAwesomeIcon icon={faXmark} />
</button>
)}
Expand All @@ -72,6 +72,7 @@ export const DefaultLayout = ({ children }: any) => {
<div className="flex">
{/* Menu */}
<aside
id="primary-navigation"
className={
(showMobileMenu
? 'z-50 left-0 right-0 w-full lg:w-auto min-h-screen bg-white dark:bg-neutral-900'
Expand Down Expand Up @@ -103,6 +104,10 @@ export const DefaultLayout = ({ children }: any) => {
{/* Burger Menu */}
<div className="flex-initial lg:hidden">
<button
type="button"
aria-label="Open navigation menu"
aria-controls="primary-navigation"
aria-expanded={showMobileMenu}
onClick={() => setShowMobileMenu(true)}
className="text-black dark:text-white hover:text-neutral-600 dark:hover:text-neutral-400 transition-colors"
>
Expand Down