This repository was archived by the owner on Jan 23, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 3737 if ( contentDiv ) {
3838 questions . forEach ( ( question , index ) => {
3939 const questionDiv = document . createElement ( "div" ) ;
40+ questionDiv . className = "answer" ;
4041 questionDiv . textContent = `Question: ${ question . key } ` ;
4142 contentDiv . appendChild ( questionDiv ) ;
4243
4344 const responseDiv = document . createElement ( "div" ) ;
45+ responseDiv . className = "answer" ;
4446 responseDiv . textContent = `Response: ${ responses [ index ] } ` ;
4547 contentDiv . appendChild ( responseDiv ) ;
4648
47- const separator = document . createElement ( "hr" ) ;
49+ const separator = document . createElement ( "br" ) ;
50+ separator . className = "answer" ;
51+ contentDiv . appendChild ( separator ) ;
4852 contentDiv . appendChild ( separator ) ;
4953 } ) ;
5054 } else {
6872 responseData . length > 0 &&
6973 typeof responseData [ 0 ] === "object"
7074 ) {
71- // Extract relevant information from each object and concatenate into a string
72- const responseText = responseData . map ( ( obj ) => obj . text ) . join ( ", " ) ;
73- responses . push ( responseText ) ;
75+ // Display each response separately
76+ responseData . forEach ( ( obj ) => {
77+ const responseText = obj . text ;
78+ responses . push ( responseText ) ;
79+ } ) ;
7480 } else {
7581 console . error (
7682 `Invalid response data format for question ${ questionId } `
You can’t perform that action at this time.
0 commit comments