feat: add account switcher menu (#941)
This commit is contained in:
@@ -73,8 +73,12 @@ export const Menu: FunctionComponent<MenuProps> = ({
|
||||
child: ComponentChild,
|
||||
index: number,
|
||||
array: ComponentChild[]
|
||||
) => {
|
||||
if (!child) return;
|
||||
): ComponentChild => {
|
||||
if (!child || (Array.isArray(child) && child.length < 1)) return;
|
||||
|
||||
if (Array.isArray(child)) {
|
||||
return child.map(mapMenuItems);
|
||||
}
|
||||
|
||||
const _child = child as VNode<unknown>;
|
||||
const isFirstMenuItem =
|
||||
|
||||
@@ -79,7 +79,7 @@ export const MenuItem: FunctionComponent<MenuItemProps> = forwardRef(
|
||||
<div
|
||||
className={`pseudo-radio-btn ${
|
||||
checked ? 'pseudo-radio-btn--checked' : ''
|
||||
} mr-2`}
|
||||
} mr-2 flex-shrink-0`}
|
||||
></div>
|
||||
) : null}
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user