github
184 of 258 branches covered (0.0%)
Branch coverage included in aggregate %.
12 of 44 new or added lines in 3 files covered. (27.27%)
2 existing lines in 1 file now uncovered.6513 of 7408 relevant lines covered (87.92%)
3.51 hits per line
1 |
import { useNavigation } from '@deriv-com/hooks'; |
2✔ |
2 |
import { Text } from '@deriv/quill-design'; |
2✔ |
|
import MobileNavLink from './mobile.nav-link'; |
2✔ |
4 |
|
2✔ |
5 |
export const MobileNavList = () => { |
|
6 |
const { navItems, setActiveMenu } = useNavigation();
|
1✔ |
7 |
|
1✔ |
8 |
return (
|
1✔ |
9 |
<ul className="flex flex-col gap-gap-lg">
|
1✔ |
|
{Object.keys(navItems).map((navItemName) => { |
1✔ |
NEW
|
const { id, ...item } = navItems[navItemName];
|
× |
NEW
|
if (item.type === 'direct') { |
× |
NEW
|
return <MobileNavLink item={item} key={navItemName} />;
|
× |
NEW
|
} |
× |
NEW
|
return (
|
× |
NEW
|
<li key={navItemName}> |
× |
NEW
|
<Text |
× |
NEW
|
size="md"
|
× |
NEW
|
className="cursor-pointer"
|
× |
NEW
|
bold |
× |
NEW
|
onClick={() => { |
× |
NEW
|
setActiveMenu?.(navItemName); |
× |
NEW
|
}} |
× |
NEW
|
> |
× |
NEW
|
{navItems[navItemName].text} |
× |
NEW
|
</Text> |
× |
NEW
|
</li> |
× |
NEW
|
); |
× |
|
})} |
1✔ |
30 |
</ul> |
1✔ |
31 |
); |
1✔ |
32 |
}; |
1✔ |
33 |
|
2✔ |
34 |
export default MobileNavList; |
2✔ |