Skip to content

Commit

Permalink
fix styles
Browse files Browse the repository at this point in the history
  • Loading branch information
paoloose committed Dec 6, 2024
1 parent 8bf6089 commit 088c5cb
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions app/src/pages/Home/components/Switcher.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useState } from 'react';
import { useTranslation, Trans } from 'react-i18next';
import { useTranslation } from 'react-i18next';
import { Select } from '@mantine/core';

export const Switcher = () => {
Expand All @@ -12,19 +11,19 @@ export const Switcher = () => {
fr: { nativeName: 'French' },
gr: { nativeName: 'German' },
ch: { nativeName: 'Chinese' }
}as const;
} as const;

const languageOptions = Object.keys(lngs).map((lng) => ({
value: lng,
label: lngs[lng as keyof typeof lngs].nativeName,
}));
}));

return (
<div
<div
style={{
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
alignItems: 'center',
}}
>
<Select
Expand All @@ -34,10 +33,10 @@ export const Switcher = () => {
onChange={(value) => value && i18n.changeLanguage(value)} // Cambiar idioma
styles={{
root: {
maxWidth: 150, // Ancho máximo del contenedor
maxWidth: 150, // Ancho máximo del contenedor
},
input: {
maxWidth: 150, // Ajusta el ancho del campo
maxWidth: 150, // Ajusta el ancho del campo
},
label: { fontWeight: 'bold', marginBottom: 5 },
}}
Expand All @@ -46,4 +45,4 @@ export const Switcher = () => {
);
}

export default Switcher;
export default Switcher;

0 comments on commit 088c5cb

Please sign in to comment.