diff --git a/src/components/chat-component/Chat.jsx b/src/components/chat-component/Chat.jsx index 8984fe6..89d2623 100644 --- a/src/components/chat-component/Chat.jsx +++ b/src/components/chat-component/Chat.jsx @@ -85,8 +85,6 @@ function clearSessionAndNavigate(){ // Clear the messages when the session ends setMessages([]); sessionStorage.removeItem("chatMessages"); - sessionStorage.removeItem("sessionId"); - sessionStorage.removeItem("sessionCode"); unsubscribeToEndSession(sessionEnded); disconnectWebsocket(); diff --git a/src/components/end-session-component/EndSession.jsx b/src/components/end-session-component/EndSession.jsx index 149a3cf..bf3013f 100644 --- a/src/components/end-session-component/EndSession.jsx +++ b/src/components/end-session-component/EndSession.jsx @@ -16,7 +16,7 @@ import { function EndSession() { const emailRef = useRef(); - const sessionCode = sessionStorage.getItem("sessionCode"); + const sessionId = sessionStorage.getItem("sessionId"); const [success, setSuccess] = useState(false); const [error, setError] = useState(false); @@ -27,8 +27,8 @@ function EndSession() { const templateId = "template_feo851p"; // TODO: change to azure endpoint - let transcriptUrl = 'http://localhost:8080/email/transcript/' + sessionCode - let dateUrl = 'http://localhost:8080/email/date/' + sessionCode + let transcriptUrl = 'http://localhost:8080/email/transcript/' + sessionId + let dateUrl = 'http://localhost:8080/email/date/' + sessionId try { const response = await axios.get(transcriptUrl);