|
|
|
@ -21,6 +21,13 @@ type GameProps = { |
|
|
|
const GamePage: React.FC<GameProps> = (props) => { |
|
|
|
const {onExitGame} = props; |
|
|
|
const [state, setState] = useState(0); |
|
|
|
const [url, setUrl] = useState(apiStore.apiUrl); |
|
|
|
|
|
|
|
const setNewUrl = (newUrl: string) => { |
|
|
|
if (url === newUrl) return; |
|
|
|
setUrl(newUrl); |
|
|
|
apiStore.setApiUrl(newUrl); |
|
|
|
}; |
|
|
|
|
|
|
|
const clickAtWitch = (guid: string) => { |
|
|
|
apiStore.turn(guid) |
|
|
|
@ -78,8 +85,8 @@ const GamePage: React.FC<GameProps> = (props) => { |
|
|
|
<li>хостинг |
|
|
|
<input |
|
|
|
type='text' |
|
|
|
value={apiStore.apiUrl} |
|
|
|
onChange={(e) => apiStore.setApiUrl(e.target.value)}/></li> |
|
|
|
value={url} |
|
|
|
onChange={(e) => setNewUrl(e.target.value)}/></li> |
|
|
|
<li>прием CORS от ooya.ga</li> |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
|