feat: clear logout state on signup page initialization.
This commit is contained in:
@@ -4,6 +4,7 @@ import { useState, useEffect } from 'react';
|
||||
import { signIn } from 'next-auth/react';
|
||||
import Link from 'next/link';
|
||||
import { authService, AuthService, RegisterRequest, agentsService, AgentType } from '@/services';
|
||||
import { resetLogoutState } from '@/services/api';
|
||||
|
||||
type UserType = 'USER' | 'AGENT';
|
||||
|
||||
@@ -27,8 +28,11 @@ export default function SignUpPage() {
|
||||
const [selectedAgentTypeId, setSelectedAgentTypeId] = useState('');
|
||||
const [loadingAgentTypes, setLoadingAgentTypes] = useState(false);
|
||||
|
||||
// Fetch agent types on mount
|
||||
// Clear logout flags and fetch agent types on mount
|
||||
useEffect(() => {
|
||||
localStorage.removeItem('isLoggingOut');
|
||||
resetLogoutState();
|
||||
|
||||
const fetchAgentTypes = async () => {
|
||||
setLoadingAgentTypes(true);
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user