Refactor everything to use GisState (WIP)

This commit is contained in:
2025-06-02 09:42:26 +02:00
parent 86d692381d
commit c265e4aa94
9 changed files with 207 additions and 79 deletions

View File

@@ -1,4 +1,4 @@
import { GisState } from "../state.js";
/**
* @class Prehistoric
*/
@@ -80,8 +80,6 @@ export class Prehistoric {
* @param {Function} gallery
*/
async setImages(imageContainer, gallery) {
//let record = await this.fetchData(`${window.API_URL}/not_conserved/${this._data.id}`)
if (this._data.images.length) {
this.images = this._data.images;
imageContainer.innerHTML = this.renderImages();
@@ -93,7 +91,7 @@ export class Prehistoric {
* @param {number} recordId
*/
async biblio(recordId) {
let finding = await this.fetchData(`${window.API_URL}/prehistoric/${recordId}`);
let finding = await this.fetchData(`${GisState.apiUrl}/prehistoric/${recordId}`);
let citations = '';