mirror of
https://github.com/Vikeo/LifeTrinket.git
synced 2025-11-14 06:58:00 +00:00
move initialGameSettings to global settings
This commit is contained in:
@@ -97,15 +97,16 @@ const healthMarks = [
|
||||
},
|
||||
];
|
||||
|
||||
type StartProps = {
|
||||
setInitialGameSettings: (options: InitialSettings) => void;
|
||||
initialGameSettings: InitialSettings | null;
|
||||
};
|
||||
|
||||
const Start = ({ initialGameSettings, setInitialGameSettings }: StartProps) => {
|
||||
const Start = () => {
|
||||
const { setPlayers } = usePlayers();
|
||||
const analytics = useAnalytics();
|
||||
const { fullscreen, wakeLock, setShowPlay } = useGlobalSettings();
|
||||
const {
|
||||
fullscreen,
|
||||
wakeLock,
|
||||
setShowPlay,
|
||||
initialGameSettings,
|
||||
setInitialGameSettings,
|
||||
} = useGlobalSettings();
|
||||
|
||||
const [openModal, setOpenModal] = useState(false);
|
||||
const [keepAwake, setKeepAwake] = useState(true);
|
||||
@@ -132,8 +133,6 @@ const Start = ({ initialGameSettings, setInitialGameSettings }: StartProps) => {
|
||||
console.error(error);
|
||||
}
|
||||
|
||||
console.log('go to start', wakeLock.active);
|
||||
|
||||
if (keepAwake) {
|
||||
wakeLock.request();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user