fix bug
Some checks failed
Deploy MyApp on Same Server / build-and-deploy (push) Failing after 1s

This commit is contained in:
2025-11-25 17:39:15 +03:30
parent 4c5ff24641
commit 9ad6dc3a79
7 changed files with 44 additions and 36 deletions

View File

@@ -19,7 +19,7 @@ export default function Home() {
if (token && userStr) {
try {
const user = JSON.parse(userStr)
JSON.parse(userStr)
// Redirect to devices check
router.push('/devices')
} catch {
@@ -92,9 +92,9 @@ export default function Home() {
} else {
setError(result.message || 'خطا در ارسال کد')
}
} catch (error: any) {
} catch (error: unknown) {
console.error('Error sending code:', error)
setError(error.message || 'خطا در ارتباط با سرور')
setError(error instanceof Error ? error.message : 'خطا در ارتباط با سرور')
} finally {
setLoading(false)
}