🚨 fix typescript types

This commit is contained in:
Manuel Ruwe
2022-08-24 18:00:50 +02:00
parent 4d757ccf66
commit fb4bad0a62

View File

@@ -1,6 +1,5 @@
import { Group, Image, Select, Stack, Text } from '@mantine/core'; import { Group, Image, Select, Stack, Text } from '@mantine/core';
import { showNotification } from '@mantine/notifications'; import { showNotification } from '@mantine/notifications';
import { IconLanguage } from '@tabler/icons';
import { forwardRef, useState } from 'react'; import { forwardRef, useState } from 'react';
import { useTranslation } from 'next-i18next'; import { useTranslation } from 'next-i18next';
@@ -12,7 +11,7 @@ export default function LanguageSwitch() {
const { changeLanguage } = i18n; const { changeLanguage } = i18n;
const { locale, locales } = useRouter(); const { locale, locales } = useRouter();
const [selectedLanguage, setSelectedLanguage] = useState<string | null>(locale); const [selectedLanguage, setSelectedLanguage] = useState<string | null | undefined>(locale);
const data = locales const data = locales
? locales.map((localeItem) => ({ ? locales.map((localeItem) => ({