mirror of
https://github.com/LucasVbr/meeting-app.git
synced 2026-12-05 17:30:50 +00:00
fix(Bar map / profile): filtered bar where name != null / fix prefgender
This commit is contained in:
+7
-1
@@ -20,6 +20,7 @@ export default function Map() {
|
||||
const toast = useToast({ position: "bottom" });
|
||||
const idSaveToast = "saved_location";
|
||||
const { data: session, status } = useSession();
|
||||
const [listBars, setListBars] = useState({} as unknown as any);
|
||||
|
||||
const {
|
||||
isLoading,
|
||||
@@ -43,7 +44,7 @@ export default function Map() {
|
||||
});
|
||||
|
||||
const {
|
||||
data: listBars,
|
||||
data,
|
||||
isError: isErrorListBars,
|
||||
isLoading: isLoadingListBars,
|
||||
error: errorListBars,
|
||||
@@ -71,6 +72,11 @@ export default function Map() {
|
||||
return err;
|
||||
});
|
||||
},
|
||||
onSuccess: (data) => {
|
||||
// filter data where name is not null
|
||||
const filteredData = data.filter((bar: any) => bar.name !== null);
|
||||
setListBars(filteredData);
|
||||
},
|
||||
});
|
||||
|
||||
const userSetLocation = useMutation({
|
||||
|
||||
Reference in New Issue
Block a user