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
|
<MapContainer
|
||||||
center={location}
|
center={location}
|
||||||
maxZoom={18}
|
|
||||||
zoom={13}
|
zoom={13}
|
||||||
minZoom={8}
|
minZoom={6}
|
||||||
zoomControl={false}
|
zoomControl={false}
|
||||||
style={{ width: "100vw", height: "100vw" }}
|
style={{ width: "100vw", height: "100vw" }}
|
||||||
>
|
>
|
||||||
|
|||||||
+6
-7
@@ -56,7 +56,7 @@ export default function Map() {
|
|||||||
} = useQuery({
|
} = useQuery({
|
||||||
queryKey: ["listBars"],
|
queryKey: ["listBars"],
|
||||||
refetchOnWindowFocus: false,
|
refetchOnWindowFocus: false,
|
||||||
enabled: Boolean(loggedUser),
|
enabled: Boolean(loggedUser) && loggedUser.location.length > 0,
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
///Utiliser api de noratim
|
///Utiliser api de noratim
|
||||||
|
|
||||||
@@ -65,12 +65,11 @@ export default function Map() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
let coordinates;
|
let coordinates;
|
||||||
if (location[0] === null || location[1] === null)
|
if (location[0] === null || location[1] === null) {
|
||||||
coordinates =
|
const co = loggedUser.location.split(",");
|
||||||
loggedUser.location[1].toString() +
|
coordinates = co[1].toString() + " " + co[0].toString();
|
||||||
" " +
|
} else
|
||||||
loggedUser.location[0].toString();
|
coordinates = location[1].toString() + " " + location[0].toString();
|
||||||
else coordinates = location[1].toString() + " " + location[0].toString();
|
|
||||||
|
|
||||||
urlBars.searchParams.append(
|
urlBars.searchParams.append(
|
||||||
"where",
|
"where",
|
||||||
|
|||||||
Reference in New Issue
Block a user