fix: resolve all TypeScript build errors blocking Docker CI
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> Agent-Logs-Url: https://github.com/christianlouis/pop_puller_to_gmail/sessions/47d45081-9f0d-4571-87d9-169ce4ae9fe0
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useRouter, useSearchParams } from 'next/navigation';
|
||||
import { authApi } from '@/lib/api';
|
||||
import { authApi, userApi } from '@/lib/api';
|
||||
import { useAuthStore } from '@/store/authStore';
|
||||
import { Loader2, CheckCircle, XCircle } from 'lucide-react';
|
||||
|
||||
@@ -37,8 +37,9 @@ export default function AuthCallbackPage() {
|
||||
const response = await authApi.googleAuth(code, redirectUri);
|
||||
|
||||
localStorage.setItem('access_token', response.access_token);
|
||||
localStorage.setItem('user', JSON.stringify(response.user));
|
||||
setUser(response.user);
|
||||
const user = response.user ? response.user : await userApi.getCurrentUser();
|
||||
localStorage.setItem('user', JSON.stringify(user));
|
||||
setUser(user);
|
||||
|
||||
setStatus('success');
|
||||
setMessage('Authentication successful! Redirecting...');
|
||||
|
||||
@@ -63,7 +63,7 @@ export default function DashboardPage() {
|
||||
return new Date(r.started_at).toDateString() === today;
|
||||
})
|
||||
.reduce((sum, r) => sum + r.emails_forwarded, 0) || 0,
|
||||
errors: runs?.filter((r) => r.errors_count > 0).length || 0,
|
||||
errors: runs?.filter((r) => r.emails_failed > 0).length || 0,
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -166,8 +166,8 @@ export default function DashboardPage() {
|
||||
{run.emails_forwarded}
|
||||
</td>
|
||||
<td className="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
||||
{run.errors_count > 0 ? (
|
||||
<span className="text-red-600 font-medium">{run.errors_count}</span>
|
||||
{run.emails_failed > 0 ? (
|
||||
<span className="text-red-600 font-medium">{run.emails_failed}</span>
|
||||
) : (
|
||||
<span className="text-gray-400">0</span>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user