More things for web
This commit is contained in:
1 parent
78b1058276
commit
a1ab487084
8 files changed
+87
-8
No files matched your search
+19
-6
@@ -1,16 +1,24 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import { ReactElement, useEffect, useState } from "react";
|
||||
import Image from "next/image";
|
||||
import styles from "./page.module.css";
|
||||
import ChargedButton from "@/components/ChargedButton";
|
||||
import MapView from "@/components/MapView";
|
||||
import WelcomeScreen from "@/components/screens/WelcomeScreen";
|
||||
import Intro from "@/components/screens/Intro";
|
||||
import { useLocalStorage } from "@/hooks/useLocalStorage";
|
||||
import { PREF } from "@/utils/const";
|
||||
import { Player } from "@/types/player";
|
||||
import { formatPlayerData, parsePlayerData } from "@/utils/dataparser";
|
||||
import { parse } from "path";
|
||||
import Tour from "@/components/screens/Tour";
|
||||
|
||||
export default function Main() {
|
||||
const [ step, setStep ] = useLocalStorage(PREF.step, "0");
|
||||
const [ stepStr, setStep ] = useLocalStorage(PREF.step, "0");
|
||||
const [ players, setPlayers ] = useLocalStorage(PREF.players, "");
|
||||
const [ tourCode, setTourCode ] = useLocalStorage(PREF.code, "");
|
||||
const step = Number.parseInt(stepStr) || 0;
|
||||
/*const [doTest, setDoTest] = useState(false);
|
||||
<ChargedButton
|
||||
onAction={() => {
|
||||
@@ -24,14 +32,19 @@ export default function Main() {
|
||||
{doTest && <MapView></MapView>}*/
|
||||
|
||||
console.log("STEP", step);
|
||||
/*useEffect(() => {
|
||||
setValue("1");
|
||||
}, []);*/
|
||||
console.log("PLAYERS", players, parsePlayerData(players));
|
||||
console.log("TourCode", tourCode);
|
||||
|
||||
const content = [
|
||||
(<WelcomeScreen key={0}/>),
|
||||
(<Intro key={1} />),
|
||||
(<Tour key={2} />)
|
||||
];
|
||||
|
||||
return (
|
||||
<div className={styles.page}>
|
||||
<main className={styles.main}>
|
||||
<WelcomeScreen />
|
||||
{content[step]}
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user