Error al cargar en el cliente los bloques predefinidos

This commit is contained in:
David Arranz 2025-01-27 13:58:47 +01:00
parent b743fc226f
commit 4a53730bbb
5 changed files with 33 additions and 30 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "@uecko-presupuestador/client", "name": "@uecko-presupuestador/client",
"private": true, "private": true,
"version": "1.0.9", "version": "1.1.0",
"author": "Rodax Software <dev@rodax-software.com>", "author": "Rodax Software <dev@rodax-software.com>",
"type": "module", "type": "module",
"scripts": { "scripts": {

View File

@ -99,13 +99,16 @@ export const BlockList = ({
onSelect: (data: BlockDataType, quantity: number) => void; onSelect: (data: BlockDataType, quantity: number) => void;
}) => { }) => {
const { i18n } = useTranslation(); const { i18n } = useTranslation();
const [language] = useState(i18n.language); const [language] = useState(i18n.resolvedLanguage || "es");
const [listState] = useState(blockData[language.toLowerCase()]); const [listState] = useState(blockData[language.toLowerCase()]);
console.log(language);
return ( return (
<ScrollArea className='h-96'> <ScrollArea className='h-96'>
<div className='flex flex-col gap-2 p-4 pt-0'> <div className='flex flex-col gap-2 p-4 pt-0'>
{listState {listState &&
listState
.sort((a, b) => a.title.localeCompare(b.title)) .sort((a, b) => a.title.localeCompare(b.title))
.map((_block, _blockIdx) => { .map((_block, _blockIdx) => {
return ( return (

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="https://fonts.upset.dev/css2?family=Poppins&display=swap" rel="stylesheet" /> <link href="https://fonts.upset.dev/css2?family=Poppins&display=swap" rel="stylesheet" />
<title>Uecko</title> <title>Uecko</title>
<script type="module" crossorigin src="/assets/index-DmLZGQJJ.js"></script> <script type="module" crossorigin src="/assets/index-C4JGyIFf.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-B5XW7DrB.css"> <link rel="stylesheet" crossorigin href="/assets/index-B5XW7DrB.css">
</head> </head>

View File

@ -1,6 +1,6 @@
{ {
"name": "uecko-presupuestador", "name": "uecko-presupuestador",
"version": "1.0.9", "version": "1.1.0",
"author": "Rodax Software <dev@rodax-software.com>", "author": "Rodax Software <dev@rodax-software.com>",
"license": "ISC", "license": "ISC",
"private": true, "private": true,