From aac05dd12d94d58769cb6d3a18aa1ff54616a533 Mon Sep 17 00:00:00 2001 From: pradeepkumar Date: Tue, 17 Mar 2026 11:01:46 +0530 Subject: [PATCH] feat: clear logout state on signup page initialization. --- src/app/(auth)/signup/page.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/(auth)/signup/page.tsx b/src/app/(auth)/signup/page.tsx index f77ec9a..7685d0a 100644 --- a/src/app/(auth)/signup/page.tsx +++ b/src/app/(auth)/signup/page.tsx @@ -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 {