diff options
author | Joffrey BION <joffrey.bion@gmail.com> | 2016-12-11 14:03:28 +0100 |
---|---|---|
committer | Joffrey BION <joffrey.bion@gmail.com> | 2016-12-11 14:03:28 +0100 |
commit | 4beb63343f658a17b9ccd6236fced501e5d15dea (patch) | |
tree | f3a8f14a6b25ad82c958dd1192ced7a539ac1d4f /src/main/js | |
parent | Add special action skeleton to finish wonders data parsing (diff) | |
download | seven-wonders-4beb63343f658a17b9ccd6236fced501e5d15dea.tar.gz seven-wonders-4beb63343f658a17b9ccd6236fced501e5d15dea.tar.bz2 seven-wonders-4beb63343f658a17b9ccd6236fced501e5d15dea.zip |
Add WS experiment test page
This pages allows to test spring/STOMP config to see which messages are properly broadcasted to all users, which are just sent to the caller, and which are sent a specific user from the server.
Diffstat (limited to 'src/main/js')
-rw-r--r-- | src/main/js/package.json | 4 | ||||
-rw-r--r-- | src/main/js/src/test/GameData.js | 19 |
2 files changed, 22 insertions, 1 deletions
diff --git a/src/main/js/package.json b/src/main/js/package.json index fbee6711..d47c5f90 100644 --- a/src/main/js/package.json +++ b/src/main/js/package.json @@ -7,7 +7,9 @@ }, "dependencies": { "react": "^15.4.1", - "react-dom": "^15.4.1" + "react-dom": "^15.4.1", + "sockjs-client": "1.1.1", + "stomp-websocket": "2.3.4" }, "scripts": { "start": "react-scripts start", diff --git a/src/main/js/src/test/GameData.js b/src/main/js/src/test/GameData.js new file mode 100644 index 00000000..21b3a077 --- /dev/null +++ b/src/main/js/src/test/GameData.js @@ -0,0 +1,19 @@ +import React, { Component } from 'react'; +import logo from '../logo.svg'; +import '../App.css'; + +class GameData extends Component { + constructor(props) { + this.props = props; + } + render() { + let cardItems = this.props.cards.map(c => <CardInfo key={c.name} card={c}/>); + return ( + <ul className="App"> + {cardItems} + </ul> + ); + } +} + +export default GameData; |