Change default server bridge with an env variable
continuous-integration/drone/push Build is passing Details

main
Clément FRÉVILLE 2 years ago
parent 5a8d4676f7
commit 83a48440b4

@ -132,7 +132,8 @@ pub fn game_view() -> Html {
#[function_component(App)]
pub fn app() -> Html {
let remote = use_state(|| "ws://localhost:8081/ws".to_string());
let bridge = option_env!("BRIDGE_HOSTNAME").unwrap_or("ws://localhost:8080/ws");
let remote = use_state(|| bridge.to_string());
let player_name = use_state(|| None);
let room_name = use_state(|| None);
@ -207,7 +208,7 @@ pub fn app() -> Html {
<main>
<div>
<label>{"Server: "}</label>
<input type="text" required={true} value={"ws://localhost:8081"} ref={remote_ref} />
<input type="text" required={true} value={bridge} ref={remote_ref} />
</div>
<div>
<label>{"Player name: "}</label>

Loading…
Cancel
Save