From 4c5e3ae959b913b4bbf70d490b050ac4471d3a16 Mon Sep 17 00:00:00 2001 From: christinaroise Date: Tue, 24 Sep 2024 12:52:19 +0200 Subject: [PATCH] fix onClick for checkbox and lint --- studio/components/LanguageSelector.tsx | 82 ++++++++++++++------------ 1 file changed, 44 insertions(+), 38 deletions(-) diff --git a/studio/components/LanguageSelector.tsx b/studio/components/LanguageSelector.tsx index ff6a394a0..3d85ed4d8 100644 --- a/studio/components/LanguageSelector.tsx +++ b/studio/components/LanguageSelector.tsx @@ -1,6 +1,7 @@ -import { Box, Button, Card, Checkbox, Flex, Text, useTheme } from "@sanity/ui"; +import { Box, Button, Card, Checkbox, Flex, useTheme } from "@sanity/ui"; import React, { useMemo } from "react"; import { PatchEvent, set } from "sanity"; + import { Language, supportedLanguages, @@ -68,47 +69,52 @@ const LanguageSelector = ({ value = [], onChange }: LanguageSelectorProps) => { : colorMap[themeType].default; return ( - handleLanguageSelection(lang)} - > - - - - - + + + {isSelected && ( + + + + )} - {isSelected && ( - - - - )} - - + + ); }), - [value, currentDefaultLanguage, themeType] + [value, currentDefaultLanguage, themeType], ); return (