Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added json.parse #2260

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/components/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -268,17 +268,19 @@
}

ws.onmessage = (event) => {
console.log('Message from server:', event.data)

Check warning on line 271 in src/components/App/index.tsx

View workflow job for this annotation

GitHub Actions / eslint-run

Unexpected console statement

Check warning on line 271 in src/components/App/index.tsx

View workflow job for this annotation

GitHub Actions / craco-build-run

Unexpected console statement

if (event.data.type === 'ping') {
const data = JSON.parse(event.data)

if (data.type === 'ping') {
return
}

SuccessNotify(event.data.message)
SuccessNotify(data.message)

setRunningProjectMessages(event.data.message)
setRunningProjectMessages(data.message)

console.log(event.data)
console.log(data)

Check warning on line 283 in src/components/App/index.tsx

View workflow job for this annotation

GitHub Actions / eslint-run

Unexpected console statement

Check warning on line 283 in src/components/App/index.tsx

View workflow job for this annotation

GitHub Actions / craco-build-run

Unexpected console statement

// Handle the message from the server here
}
Expand All @@ -288,7 +290,7 @@
}

ws.onclose = () => {
console.log('WebSocket connection closed')

Check warning on line 293 in src/components/App/index.tsx

View workflow job for this annotation

GitHub Actions / eslint-run

Unexpected console statement

Check warning on line 293 in src/components/App/index.tsx

View workflow job for this annotation

GitHub Actions / craco-build-run

Unexpected console statement
}
}, [runningProjectId, setRunningProjectMessages])

Expand Down
Loading