R7, R2, Heartbeat, Sessions, Code, cleanup, Outro
This commit is contained in:
1 parent
b5e5cc502d
commit
5b9fe3ea21
25 files changed
+346
-116
No files matched your search
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { useLocalStorage } from "@/hooks/useLocalStorage"
|
||||
import { PREF } from "@/utils/const"
|
||||
import { API_PREFIX, PREF } from "@/utils/const"
|
||||
import ChargedButton from "../ChargedButton";
|
||||
import styles from "@/css/Tour.module.css";
|
||||
import MapView, { PlaceMarker } from "../MapView";
|
||||
@@ -76,26 +76,26 @@ export default function Tour() {
|
||||
|
||||
const [ code, ] = useLocalStorage(PREF.code, "");
|
||||
|
||||
/*useEffect(() => {
|
||||
useEffect(() => {
|
||||
if (code.length === 0) {
|
||||
return;
|
||||
}
|
||||
const intervalId = setInterval(() => {
|
||||
heartbeat({
|
||||
"playerCount": playerCountStr,
|
||||
"player_count": playerCountStr,
|
||||
"players": players,
|
||||
"worthy_answers": worthyAnswersStr,
|
||||
"completed_riddles": completedRiddlesStr,
|
||||
"points": pointsStr,
|
||||
"boughtHints": boughtHintsStr,
|
||||
"voiceOverStr": voiceOverStr
|
||||
"bought_hints": boughtHintsStr,
|
||||
"voice_over": voiceOverStr
|
||||
}, code);
|
||||
}, 2000);
|
||||
}, 50000);
|
||||
|
||||
return () => {
|
||||
clearInterval(intervalId);
|
||||
};
|
||||
}, [playerCountStr, players, worthyAnswersStr, completedRiddlesStr, pointsStr, boughtHintsStr, voiceOverStr]);*/
|
||||
}, [playerCountStr, players, worthyAnswersStr, completedRiddlesStr, pointsStr, boughtHintsStr, voiceOverStr]);
|
||||
|
||||
const selectedActiveRiddleData = clickedMarker !== null ? riddleData.find(v => v.id === clickedMarker) as Riddle : null;
|
||||
|
||||
@@ -152,7 +152,7 @@ export default function Tour() {
|
||||
if (isNearby) {
|
||||
setClickedMarker(marker.id);
|
||||
} else {
|
||||
alert(`Ihr seid noch zu weit entfernt!`);
|
||||
alert(`Ihr seid noch zu weit entfernt!`); // TODO: Change to OldPopUp
|
||||
}
|
||||
}}></MapView>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user