From c77f260963ee5888cd74b43817f3ae7bb591d86f Mon Sep 17 00:00:00 2001 From: James Ketrenos Date: Thu, 22 May 2025 17:10:55 -0700 Subject: [PATCH] Fixups --- frontend/src/NewApp/Pages/GenerateCandidate.tsx | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/frontend/src/NewApp/Pages/GenerateCandidate.tsx b/frontend/src/NewApp/Pages/GenerateCandidate.tsx index 7b00907..cc4e799 100644 --- a/frontend/src/NewApp/Pages/GenerateCandidate.tsx +++ b/frontend/src/NewApp/Pages/GenerateCandidate.tsx @@ -41,11 +41,9 @@ const GenerateCandidate = (props: BackstoryElementProps) => { const [streaming, setStreaming] = useState(''); const [processing, setProcessing] = useState(false); const [user, setUser] = useState(emptyUser); - const [userTimestamp, setUserTimestamp] = useState(0); const [prompt, setPrompt] = useState(''); const [resume, setResume] = useState(''); const [canGenImage, setCanGenImage] = useState(false); - const [hasProfile, setHasProfile] = useState(false); const [status, setStatus] = useState(''); const [timestamp, setTimestamp] = useState(0); const [state, setState] = useState(0); // Replaced stateRef @@ -98,7 +96,6 @@ const GenerateCandidate = (props: BackstoryElementProps) => { controllerRef.current = null; setState(0); setCanGenImage(true); - setHasProfile(true); setShouldGenerateProfile(false); setUser({ ...user, has_profile: true }); } @@ -110,7 +107,6 @@ const GenerateCandidate = (props: BackstoryElementProps) => { controllerRef.current = null; setState(0); setCanGenImage(true); - setHasProfile(true); /* Hack for now */ setShouldGenerateProfile(false); break; default: @@ -123,7 +119,7 @@ const GenerateCandidate = (props: BackstoryElementProps) => { } else { setTimestamp(Date.now()) } - if (data.message !== '') { + if (data.message) { setStatus(data.message); } break; @@ -272,7 +268,6 @@ const GenerateCandidate = (props: BackstoryElementProps) => { controllerRef.current = null; setState(0); setCanGenImage(true); - setHasProfile(true); setShouldGenerateProfile(false); } break; @@ -283,7 +278,6 @@ const GenerateCandidate = (props: BackstoryElementProps) => { controllerRef.current = null; setState(0); setCanGenImage(true); - setHasProfile(true); setShouldGenerateProfile(false); break; default: @@ -334,10 +328,6 @@ const GenerateCandidate = (props: BackstoryElementProps) => { } }, [streaming, state]); - useEffect(() => { - setUserTimestamp(Date.now()); - }, [user]); - if (!sessionId) { return <>; } @@ -368,7 +358,7 @@ const GenerateCandidate = (props: BackstoryElementProps) => {