github
200 of 272 branches covered (0.0%)
Branch coverage included in aggregate %.
230 of 300 new or added lines in 16 files covered. (76.67%)
7242 of 8567 relevant lines covered (84.53%)
3.83 hits per line
|
import { useLanguageSwitcher } from '@deriv-com/hooks'; |
2✔ |
|
import { Text } from '@deriv/quill-design'; |
2✔ |
|
|
2✔ |
|
const LanguageContent = () => {
|
2✔ |
NEW
|
const { langItems, selectLanguage } = useLanguageSwitcher();
|
× |
NEW
|
return (
|
× |
NEW
|
<div className="grid w-full grid-flow-col grid-rows-4 items-start gap-gap-lg gap-y-50 overflow-y-auto overscroll-y-contain py-general-2xl">
|
× |
NEW
|
{Object.keys(langItems).map((item) => ( |
× |
NEW
|
<div className="flex py-general-sm" key={langItems[item].displayName}>
|
× |
NEW
|
<Text |
× |
NEW
|
bold |
× |
NEW
|
className="cursor-pointer"
|
× |
NEW
|
onClick={() => { |
× |
NEW
|
selectLanguage?.(langItems[item]); |
× |
NEW
|
}} |
× |
NEW
|
> |
× |
NEW
|
{langItems[item].displayName} |
× |
NEW
|
</Text> |
× |
NEW
|
</div> |
× |
NEW
|
))} |
× |
NEW
|
</div> |
× |
NEW
|
); |
× |
NEW
|
}; |
× |
|
|
2✔ |
|
export default LanguageContent; |
2✔ |