import { useEffect } from 'react' import { useInit, useWatcher } from '@/hooks/storage' import { useStep, Step } from '@remake/hooks' import Home from '@/containers/Home' import Mode from '@/containers/Mode' import Chara from '@/containers/Chara' import Pick from '@/containers/TalentPick' import Alloc from '@/containers/Alloc' import Play from '@/containers/Play' import Summary from '@/containers/Summary' import './Game.css' export function Container() { /* prettier-ignore */ switch (useStep()) { case Step.Idle: return case Step.Mode: return case Step.Chara: return case Step.Pick: return case Step.Alloc: return case Step.Play: return case Step.Summary: return default: return null } } /* prettier-ignore */ const Loading = () =>

载入中...

const Saving = ({ active }: { active: boolean }) => (
保存中...
) /* prettier-ignore */ export function Game() { const [inited, init] = useInit() const saving = useWatcher() useEffect(() => { if (!inited) init() }, [inited, init]) if (!inited) return return <> } export default Game