async fn login_call(cmd: String, data: JsValue, state: Rc<State>) {
        log("LOGIN_CALL");
        // Bind worker to local variable
        let worker = state.worker();
        // Perform operation
        match cmd.as_ref() {
            "login" => {
                worker.login(data).await;
            },
            "network" => {
                console_log!("NETWORK: {:?}", &data);
            },
            "unregister" => {
                state.set_mode(None);
            }
            _ => {}
        }
    }
/// Process calls on the login page.
Process calls on the login page.
Process calls on the login page .
async fn login_call(cmd: String, data: JsValue, state: Rc<State>) {
        log("LOGIN_CALL");
        // Bind worker to local variable
        let worker = state.worker();
        // Perform operation
        match cmd.as_ref() {
            "login" => {
                worker.login(data).await;
            },
            "network" => {
                console_log!("NETWORK: {:?}", &data);
            },
            "unregister" => {
                state.set_mode(None);
            }
            _ => {}
        }
    }
async fn login_call ( cmd : String , data : JsValue , state : Rc < State > ) { log ( " " ) ; // Bind worker to local variable let worker = state . worker ( ) ; // Perform operation match cmd . as_ref ( ) { " " => { worker . login ( data ) . await ; } , " " => { console_log ! ( " " data ) ; } , " " => { state . set_mode ( None ) ; } _ => { } } }
Process calls on the login page.
Process calls on the login page .
cmd
String
data
JsValue
state
Rc<State>
cmd
String
data
JsValue
state
Rc<State>