fix issues
This commit is contained in:
@@ -217,8 +217,13 @@ export default function SignupPage() {
|
||||
});
|
||||
|
||||
// Refresh session in context so header updates immediately
|
||||
await refreshSession();
|
||||
router.push(returnTo);
|
||||
try {
|
||||
await refreshSession();
|
||||
} catch (error) {
|
||||
console.error('Failed to refresh session after signup:', error);
|
||||
}
|
||||
// Always redirect to dashboard after signup
|
||||
router.push('/dashboard');
|
||||
} catch (error) {
|
||||
setErrors({
|
||||
submit: error instanceof Error ? error.message : 'Signup failed. Please try again.',
|
||||
@@ -237,7 +242,8 @@ export default function SignupPage() {
|
||||
await authService.demoLogin({ role: 'driver' });
|
||||
|
||||
await new Promise(resolve => setTimeout(resolve, 500));
|
||||
router.push(returnTo === '/onboarding' ? '/dashboard' : returnTo);
|
||||
// Always redirect to dashboard after demo login
|
||||
router.push('/dashboard');
|
||||
} catch {
|
||||
setErrors({
|
||||
submit: 'Demo login failed. Please try again.',
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import AlphaFooter from '@/components/alpha/AlphaFooter';
|
||||
import { AlphaNav } from '@/components/alpha/AlphaNav';
|
||||
import DevToolbar from '@/components/dev/DevToolbar';
|
||||
import NotificationProvider from '@/components/notifications/NotificationProvider';
|
||||
import { NotificationIntegration } from '@/components/errors/NotificationIntegration';
|
||||
import { ApiErrorBoundary } from '@/components/errors/ApiErrorBoundary';
|
||||
import { ApiStatusToolbar } from '@/components/errors/ApiStatusToolbar';
|
||||
import { NotificationIntegration } from '@/components/errors/NotificationIntegration';
|
||||
import NotificationProvider from '@/components/notifications/NotificationProvider';
|
||||
import { AuthProvider } from '@/lib/auth/AuthContext';
|
||||
import { getAppMode } from '@/lib/mode';
|
||||
import { ServiceProvider } from '@/lib/services/ServiceProvider';
|
||||
@@ -75,10 +74,6 @@ export default async function RootLayout({
|
||||
</main>
|
||||
<AlphaFooter />
|
||||
<DevToolbar />
|
||||
{/* API Status Toolbar for development - only shows in dev mode */}
|
||||
{process.env.NODE_ENV === 'development' && (
|
||||
<ApiStatusToolbar position="bottom-right" autoHide={true} />
|
||||
)}
|
||||
</ApiErrorBoundary>
|
||||
</NotificationProvider>
|
||||
</AuthProvider>
|
||||
@@ -121,10 +116,6 @@ export default async function RootLayout({
|
||||
<div className="pt-16">
|
||||
{children}
|
||||
</div>
|
||||
{/* API Status Toolbar for development */}
|
||||
{process.env.NODE_ENV === 'development' && (
|
||||
<ApiStatusToolbar position="bottom-right" autoHide={true} />
|
||||
)}
|
||||
</ApiErrorBoundary>
|
||||
</NotificationProvider>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user