Skip to content

Commit

Permalink
Merge pull request #2260 from stakwork/feature/add-stak-messages
Browse files Browse the repository at this point in the history
feat: added json.parse
  • Loading branch information
Rassl authored Sep 30, 2024
2 parents 81e07bf + bac647d commit c9ab0a7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -270,15 +270,17 @@ export const App = () => {
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 / build

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 / build

Unexpected console statement

// Handle the message from the server here
}
Expand Down

0 comments on commit c9ab0a7

Please sign in to comment.