Skip to content

Commit

Permalink
community: tic-tac-toe: fix names bug and add docker-compose (hasura#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Rishichandra Wawhal authored and shahidhk committed Oct 11, 2019
1 parent 624ce0c commit 81de56d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ const Play = ({boardId, client}) => {
status= <h2 style={{color: isSelfWinner ? 'green' : 'red'}}>{winner}</h2>
} else {
if (board.turn === 'x') {
status = <h2 style={{color: isSelfUser1 ? 'green' : '#565656'}}>{isSelfUser1 ? 'Your' : `${board.user2.name}'s`} turn</h2>
status = <h2 style={{color: isSelfUser1 ? 'green' : '#565656'}}>{isSelfUser1 ? 'Your' : `${board.user1.name}'s`} turn</h2>
} else {
status = <h2 style={{color: !isSelfUser1 ? 'green' : '#565656'}}>{!isSelfUser1 ? 'Your' : `${board.user1.name}'s`} turn</h2>
status = <h2 style={{color: !isSelfUser1 ? 'green' : '#565656'}}>{!isSelfUser1 ? 'Your' : `${board.user2.name}'s`} turn</h2>
}
}

Expand Down
32 changes: 32 additions & 0 deletions community/sample-apps/tic-tac-toe-react/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: '3.6'
services:
postgres:
restart: always
image: postgres
tic-tac-toe-react-remote-schema:
restart: always
image: tic-tac-toe-react-remote-schema
depends_on:
- postgres
environment:
POSTGRES_CONNECTION_STRING: postgres://postgres:@postgres:5432/postgres
build: ./remote-schema
tic-tac-toe-react-hge:
image: hasura/graphql-engine:v1.0.0-alpha44.cli-migrations
depends_on:
- tic-tac-toe-react-remote-schema
restart: always
environment:
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:@postgres:5432/postgres
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
TIC_TAC_REMOTE_SCHEMA_URL: http://tic-tac-toe-react-remote-schema:4000
volumes:
- ./hasura/migrations:/hasura-migrations
tic-tac-toe-ui:
restart: always
image: tic-tac-toe-ui
ports:
- "8000:8000"
depends_on:
- tic-tac-toe-react-hge
build: ./client

0 comments on commit 81de56d

Please sign in to comment.