mirror of
https://github.com/LucasVbr/meeting-app.git
synced 2026-05-13 17:21:53 +00:00
fix(position api bar): position api bar
This commit is contained in:
@@ -41,9 +41,8 @@ export default function MapComponent(props: any) {
|
||||
) : (
|
||||
<MapContainer
|
||||
center={location}
|
||||
maxZoom={18}
|
||||
zoom={13}
|
||||
minZoom={8}
|
||||
minZoom={6}
|
||||
zoomControl={false}
|
||||
style={{ width: "100vw", height: "100vw" }}
|
||||
>
|
||||
|
||||
+6
-7
@@ -56,7 +56,7 @@ export default function Map() {
|
||||
} = useQuery({
|
||||
queryKey: ["listBars"],
|
||||
refetchOnWindowFocus: false,
|
||||
enabled: Boolean(loggedUser),
|
||||
enabled: Boolean(loggedUser) && loggedUser.location.length > 0,
|
||||
queryFn: async () => {
|
||||
///Utiliser api de noratim
|
||||
|
||||
@@ -65,12 +65,11 @@ export default function Map() {
|
||||
);
|
||||
|
||||
let coordinates;
|
||||
if (location[0] === null || location[1] === null)
|
||||
coordinates =
|
||||
loggedUser.location[1].toString() +
|
||||
" " +
|
||||
loggedUser.location[0].toString();
|
||||
else coordinates = location[1].toString() + " " + location[0].toString();
|
||||
if (location[0] === null || location[1] === null) {
|
||||
const co = loggedUser.location.split(",");
|
||||
coordinates = co[1].toString() + " " + co[0].toString();
|
||||
} else
|
||||
coordinates = location[1].toString() + " " + location[0].toString();
|
||||
|
||||
urlBars.searchParams.append(
|
||||
"where",
|
||||
|
||||
Reference in New Issue
Block a user