This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export async function fetchData(header, query, url) { | |
try { | |
const timeout = 8000; | |
const controller = new AbortController(); | |
const id = setTimeout(() => controller.abort(), timeout); | |
const response = await fetch(url, { | |
method: "POST", | |
headers: { ...header }, | |
body: JSON.stringify(query), | |
timeout: timeout, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const resultsDiv = document.querySelector("#results"); | |
const advisoryDetails = document.querySelector("#advisory-heading"); | |
const errModal = document.querySelector("#error-modal"); | |
const errModalTitle = document.querySelector(".modal-title"); | |
const errModalBody = document.querySelector(".modal-body"); | |
const logout = document.querySelector("#logout"); | |
const logoutForm = document.querySelector("#logout-form"); | |
const modalFooter = document.querySelector(".modal-footer"); | |
const modalCloseBtn = document.querySelector("#btn-close-modal"); | |
const cropDiagnosisSection = document.querySelector("#nav-to-cropdiagnosis"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="carousel-item active"> | |
<div class="row"> | |
<div class="col-md-4 mb-3"> | |
<div class="card"> | |
<img class="img-fluid" alt="100%x280" src="https://images.unsplash.com/photo-1532781914607-2031eca2f00d?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjMyMDc0fQ&s=7c625ea379640da3ef2e24f20df7ce8d"> | |
<div class="card-body"> | |
<h4 class="card-title">Special title treatment</h4> | |
<p class="card-text">With supporting text below as a natural lead-in to additional content.</p> | |
<div class="form-group"> |
NewerOlder