added auto routing

This commit is contained in:
Ryan Bakkes 2022-01-04 04:23:35 +01:00
parent adbe142ffc
commit da8400dc6a
2 changed files with 3 additions and 4 deletions

View File

@ -77,7 +77,6 @@ export class ModalsGamePage {
break;
case "Values":
const status = await this.game.initValuesGame();
console.log(`/${game.toLowerCase()}${status}`);
this.router.navigateByUrl(`/${game.toLowerCase()}${status}`);
return;
}

View File

@ -31,8 +31,9 @@ export class GameService {
await this.storage.remove(`${game.toUpperCase()}GAME_TOKEN`);
}
public async saveGameStorage(game: string, status: string, type: string, value: any){
await this.storage.set(`${game.toUpperCase()}GAME_TOKEN`, { status: status, type: value});
public async saveGameStorage(game: string, status: string, sort: string, value: any){
// TODO LOOK AT THIS
await this.storage.set(`${game.toUpperCase()}GAME_TOKEN`, { status: status, cards: value});
}
// finish when backend is completed
@ -56,7 +57,6 @@ export class GameService {
const token = await this.storage.get("VALUESGAME_TOKEN");
// console.log(this.cardset["cards"]);
this.cardset = token["cards"];
return token["status"];
}
}