Reubencf commited on
Commit
91918e1
·
1 Parent(s): 77528a0

Fix last sessionKey references in validation logic

Browse files
app/components/SessionManagerWindow.tsx CHANGED
@@ -57,29 +57,29 @@ export function SessionManagerWindow({ onClose, sessionId }: SessionManagerWindo
57
 
58
  // Session is automatically created - no manual creation needed!
59
 
60
- // Validate session key on component mount
61
  useEffect(() => {
62
- if (sessionKey) {
63
- validateSessionKey()
64
  }
65
  // eslint-disable-next-line react-hooks/exhaustive-deps
66
  }, [])
67
 
68
- // Validate session key
69
- const validateSessionKey = async () => {
70
  setValidating(true)
71
  setError(null)
72
  try {
73
  const response = await fetch('/api/sessions/verify', {
74
  method: 'POST',
75
  headers: { 'Content-Type': 'application/json' },
76
- body: JSON.stringify({ sessionKey })
77
  })
78
  const data = await response.json()
79
 
80
  if (data.success && data.valid) {
81
  setSessionValid(true)
82
- setSuccess('✅ Session is VALID! You can safely copy and use this key with Claude Desktop.')
83
  setTimeout(() => setSuccess(null), 5000)
84
  } else {
85
  setSessionValid(false)
 
57
 
58
  // Session is automatically created - no manual creation needed!
59
 
60
+ // Validate session on component mount
61
  useEffect(() => {
62
+ if (sessionId) {
63
+ validateSession()
64
  }
65
  // eslint-disable-next-line react-hooks/exhaustive-deps
66
  }, [])
67
 
68
+ // Validate session
69
+ const validateSession = async () => {
70
  setValidating(true)
71
  setError(null)
72
  try {
73
  const response = await fetch('/api/sessions/verify', {
74
  method: 'POST',
75
  headers: { 'Content-Type': 'application/json' },
76
+ body: JSON.stringify({ sessionId })
77
  })
78
  const data = await response.json()
79
 
80
  if (data.success && data.valid) {
81
  setSessionValid(true)
82
+ setSuccess('✅ Session is VALID! You can safely copy and use this Session ID with Claude Desktop.')
83
  setTimeout(() => setSuccess(null), 5000)
84
  } else {
85
  setSessionValid(false)