File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -180,8 +180,6 @@ <h3 id="modal-title"></h3>
180180</ div >
181181
182182< script >
183- const AZURE_API_ENDPOINT = "https://eoagritool-cwfzfndaazauawex.canadacentral-01.azurewebsites.net" ;
184-
185183 document . addEventListener ( 'DOMContentLoaded' , ( ) => {
186184 loadDashboardData ( ) ;
187185 } ) ;
@@ -238,9 +236,9 @@ <h3 id="modal-title"></h3>
238236
239237 async function fetchRecommendationsData ( ) {
240238 try {
241- const response = await fetch ( ` ${ AZURE_API_ENDPOINT } / recommendations` ) ;
239+ const response = await fetch ( "/api/ recommendations" ) ;
242240 const data = await response . json ( ) ;
243- renderRecommendationCards ( data . recommendations ) ;
241+ renderRecommendationCards ( data ) ;
244242 } catch ( error ) {
245243 showError ( "Failed to load agricultural recommendations" ) ;
246244 document . getElementById ( 'recommendations-card' ) . innerHTML = `
@@ -294,8 +292,7 @@ <h3 class="card-title">🌱 Expert Recommendations</h3>
294292 const recElement = document . createElement ( 'div' ) ;
295293 recElement . innerHTML = `
296294 <p><strong>${ rec . title } </strong></p>
297- <p>${ rec . summary } </p>
298- <button onclick="getRecommendationDetails(${ index } )">View Details</button>
295+ <p>${ rec . details } </p>
299296 ` ;
300297 recommendationsCard . appendChild ( recElement ) ;
301298 } ) ;
You can’t perform that action at this time.
0 commit comments