Merge branch 'dev_environment' of gitlab.com:brandx/bxt-app into dev_environment

This commit is contained in:
Carter 2025-03-26 16:28:40 -06:00
commit 976736c0b4
3 changed files with 6 additions and 13 deletions

View file

@ -134,12 +134,12 @@ export default function Geocoder(props: Props) {
geoCoder.on("error", () => {}); geoCoder.on("error", () => {});
//event is fired when an option is selected from the results //event is fired when an option is selected from the results
geoCoder.on("result", (res: Result) => { geoCoder.on("result", (res) => {
if (resultFunction) { if (resultFunction) {
resultFunction(res); resultFunction(res.result);
} }
if (customTransition) { if (customTransition) {
customTransition(res); customTransition(res.result);
} }
}); });
//once the map ref and access token are set up add the control to the map //once the map ref and access token are set up add the control to the map

View file

@ -1351,13 +1351,6 @@ import { Result } from "@mapbox/mapbox-gl-geocoder";
}; };
const geocoderResult = (result: Result) => { const geocoderResult = (result: Result) => {
clickDelay()
console.log("result function")
console.log(result)
console.log("immediate id: " + result.id)
setTimeout(() => {
console.log("result.id after waiting 2 seconds: " + result.id)
}, 2000);
if(result.id !== undefined){ if(result.id !== undefined){
setObjectKey(result.id.toString()); setObjectKey(result.id.toString());
if (result.place_type.includes("bin")) { if (result.place_type.includes("bin")) {
@ -1375,8 +1368,8 @@ import { Result } from "@mapbox/mapbox-gl-geocoder";
}; };
const geocoderTransition = (result: Result) => { const geocoderTransition = (result: Result) => {
let long = result.center ? result.center[0] : 0; let long = result.center[0];
let lat = result.center ? result.center[1] : 0; let lat = result.center[1];
if (long && lat) { if (long && lat) {
let centered = true; let centered = true;
let zoom = zoomLevels.far; let zoom = zoomLevels.far;

View file

@ -269,7 +269,7 @@ export default function Bin(props: Props) {
loadRef.current = true; loadRef.current = true;
//add the presets to the bin page data load //add the presets to the bin page data load
binAPI binAPI
.getBinPageData(binID, user.id(), showErrors) .getBinPageData(binKey ?? binID, user.id(), showErrors)
.then(resp => { .then(resp => {
if (resp.data.grainCompositionNames) { if (resp.data.grainCompositionNames) {
let tempMap: Map<string, string> = new Map(); let tempMap: Map<string, string> = new Map();