mirror of
https://github.com/LucasVbr/meeting-app.git
synced 2026-07-09 23:18:07 +00:00
fix(position api bar): position api bar
This commit is contained in:
+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