github
199 of 273 branches covered (0.0%)
Branch coverage included in aggregate %.
270 of 379 new or added lines in 21 files covered. (71.24%)
7250 of 8621 relevant lines covered (84.1%)
3.81 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✔ |