feat(Map with bars): added the map with bars provided by opendatasoft

TODO: -modal to invite match to bar

-use overpass ? (openStreetMap API)
This commit is contained in:
Laurian-Dufrechou
2023-04-24 22:38:08 +02:00
parent 4889426643
commit 57f97b8e22
15 changed files with 4209 additions and 3819 deletions
+5 -6
View File
@@ -53,9 +53,9 @@ export default function UserProfile() {
const [passions, setPassions] = useState(null);
const [showTooltipAge, setShowTooltipAge] = useState(true);
const [sliderAgeValue, setSliderAgeValue] = useState([]);
const [showTooltipDistance, setShowTooltipDistance] = useState(true);
const [sliderDistanceValue, setSliderDistanceValue] = useState([]);
const [sliderAgeValue, setSliderAgeValue] = useState([] as number[]);
// const [showTooltipDistance, setShowTooltipDistance] = useState(true);
// const [sliderDistanceValue, setSliderDistanceValue] = useState([]);
const {
handleSubmit,
@@ -88,7 +88,7 @@ export default function UserProfile() {
const { user } = session as unknown as Session;
setSliderAgeValue([user.ageMin, user.ageMax]);
setSliderDistanceValue(user.distance);
// setSliderDistanceValue(user.distance);
return fetch(`/api/users/${user.id}`)
.then((res) => res.json())
@@ -110,10 +110,9 @@ export default function UserProfile() {
position: "top",
});
if (status === "unauthenticated") router.push("/");
return <span>Error: {error.message}</span>;
}
const getTextGender = (gender) => {
const getTextGender = (gender: string) => {
switch (gender) {
case Gender.MALE:
return "Homme";