update error handler

This commit is contained in:
smanylov
2026-02-04 16:10:16 +07:00
parent 40fa737208
commit e778cf7e33
6 changed files with 53 additions and 24 deletions
+38
View File
@@ -0,0 +1,38 @@
'use client'
import { useStoreWithDevtools } from '@/app/stores/useStoreWithDevtools';
import { useTranslations } from 'next-intl';
export function TestComponent() {
const t = useTranslations('Global');
const setText1 = useStoreWithDevtools(s => s.setValue1);
const setText2 = useStoreWithDevtools(s => s.setValue2);
const text1 = useStoreWithDevtools(s => s.value1);
const text2 = useStoreWithDevtools(s => s.value2);
return (
<div className="mb-4">
<div className='mb-2'>
<input
className='border rounded-md mr-1'
type="text"
onChange={(e) => {
setText1(Number(e.target.value))
}}
/>
<span>{t('check')} {text1}</span>
</div>
<div>
<input
className='border rounded-md mr-1'
type="text"
onChange={(e) => {
setText2(Number(e.target.value))
}}
/>
<span>{t('violation')} {text2}</span>
</div>
</div>
)
}