designsss
This commit is contained in:
1 parent
9401ef3a9e
commit
eb64159275
5 files changed
+225
-60
No files matched your search
@@ -27,53 +27,42 @@ export default function Tour() {
|
||||
const [ test, setTest ] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
let timerId: string | number | NodeJS.Timeout | undefined;
|
||||
let timerId: string | number | NodeJS.Timeout | undefined;
|
||||
|
||||
const requestPosition = () => {
|
||||
timerId = setTimeout(() => {
|
||||
navigator.geolocation.getCurrentPosition(
|
||||
(position) => {
|
||||
setMarkers([{
|
||||
id: "riddle_one",
|
||||
title: "Erstes Rätsel",
|
||||
description: "Test Punkt verschoben vom Standort",
|
||||
lng: position.coords.longitude + 0.002,
|
||||
lat: position.coords.latitude,
|
||||
}]);
|
||||
},
|
||||
(error) => {
|
||||
requestPosition();
|
||||
}
|
||||
);
|
||||
}, 500);
|
||||
};
|
||||
const requestPosition = () => {
|
||||
timerId = setTimeout(() => {
|
||||
navigator.geolocation.getCurrentPosition(
|
||||
(position) => {
|
||||
setMarkers([{
|
||||
id: "riddle_one",
|
||||
title: "Erstes Rätsel",
|
||||
description: "Test Punkt verschoben vom Standort",
|
||||
lng: position.coords.longitude + 0.002,
|
||||
lat: position.coords.latitude,
|
||||
}]);
|
||||
},
|
||||
(error) => {
|
||||
requestPosition();
|
||||
}
|
||||
);
|
||||
}, 500);
|
||||
};
|
||||
|
||||
requestPosition();
|
||||
requestPosition();
|
||||
|
||||
return () => clearTimeout(timerId);
|
||||
}, []);
|
||||
return () => clearTimeout(timerId);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
return (
|
||||
<div className={styles["screen-container"]}>
|
||||
<div className={styles["top-bar"]}>
|
||||
<p>{"Ruf: " + points}</p>
|
||||
<p>{"Players: " + playersStr}</p>
|
||||
<br></br>
|
||||
<ChargedButton onAction={() => {
|
||||
|
||||
setTourCode("");
|
||||
setCompletedRiddles("");
|
||||
setPlayers("");
|
||||
setPoints("");
|
||||
setStep("0");
|
||||
}} holdDuration={500}>
|
||||
Zurücksetzen
|
||||
</ChargedButton>
|
||||
<ChargedButton onAction={() => {
|
||||
|
||||
}} holdDuration={500}>
|
||||
Test
|
||||
</ChargedButton>
|
||||
<div className={styles["top-bar-content"]}>
|
||||
<div className={styles["points-outer-box"]}>
|
||||
<div className={styles["points-inner-box"]}>
|
||||
Your content goes here
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className={styles["main-content"]}>
|
||||
<div className={styles["map"]}>
|
||||
|
||||
Reference in new issue
Block a user