Skip to content

Commit

Permalink
fix propagation wallet switcher (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeddaqqa authored Dec 21, 2023
1 parent 93f1c2f commit 1efb335
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/components/Navbar/Account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default function Account({ handleCloseSidebar }: LoginIconProps) {
<Icon path={mdiCog} size={0.8} />
<Typography variant="body1">Settings</Typography>
</MenuItem>
{auth && <AliasPicker />}
{auth && <AliasPicker handleKeyDown={handleKeyDown} />}
<MenuItem>
<LoadAccountMenu type="kyc" />
</MenuItem>
Expand All @@ -84,6 +84,7 @@ export default function Account({ handleCloseSidebar }: LoginIconProps) {
top: '5px',
width: '50px',
left: 'calc(100% - 55px)',
zIndex: '1',
}}
label="beta"
/>
Expand Down Expand Up @@ -158,6 +159,7 @@ export default function Account({ handleCloseSidebar }: LoginIconProps) {
top: '5px',
width: '50px',
left: 'calc(100% - 55px)',
zIndex: '1',
}}
label="beta"
/>
Expand All @@ -181,7 +183,7 @@ export default function Account({ handleCloseSidebar }: LoginIconProps) {
<Icon path={mdiCog} size={1} />
<Typography variant="body2">Settings</Typography>
</MenuItem>
<AliasPicker />
<AliasPicker handleKeyDown={handleKeyDown} />
<MenuItem>
<ThemeSwitcher />
</MenuItem>
Expand Down
5 changes: 4 additions & 1 deletion src/components/Navbar/AliasPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import DialogAnimate from '../Animate/DialogAnimate'
import LoadMyKeysComponent from './LoadMyKeysComponent'
import LoadSaveKeysComponent from './LoadSaveKeysComponent'

const AliasPicker = () => {
const AliasPicker = ({ handleKeyDown }: { handleKeyDown: (e: any) => void }) => {
const [open, setOpen] = useState(false)
const [load, setLoad] = useState(false)
const handleOpenModal = () => {
Expand All @@ -39,6 +39,9 @@ const AliasPicker = () => {
if (!load) return <></>
return (
<MenuItem
onKeyDown={e => {
handleKeyDown(e)
}}
sx={{ display: 'flex', alignItems: 'center', justifyContent: 'start', gap: '8px' }}
>
<Icon path={mdiOpenInNew} size={1} />
Expand Down

0 comments on commit 1efb335

Please sign in to comment.