|
1 | | -import React from "react"; |
| 1 | +import React, { useState } from "react"; |
2 | 2 | import "./App.css"; |
3 | 3 | import { |
4 | 4 | AIServiceSpeechRealtimeApi, |
@@ -257,23 +257,33 @@ function App() { |
257 | 257 | setErrors([]); |
258 | 258 | }; |
259 | 259 |
|
| 260 | + |
| 261 | + const [isQuestionsVisible, setIsQuestionsVisible] = useState(false); |
| 262 | + |
| 263 | + const toggleQuestionsVisibility = () => { |
| 264 | + setIsQuestionsVisible(!isQuestionsVisible); |
| 265 | + }; |
| 266 | + |
260 | 267 | return ( |
261 | 268 | <div className="App"> |
262 | 269 | <div> |
263 | 270 | <h3>Interactive AI Holograms</h3> |
264 | 271 | <h5>Click 'Start session' and ask DeeBee/DB a question. </h5> |
265 | | - <br /> |
266 | | - <h5>Examples...</h5> |
267 | | - 'What is the latest version of the Oracle Database?' |
268 | | - <br /> |
269 | | - 'What is the latest version of the Oracle Database? Use Rag.' |
270 | | - <br /> |
271 | | - 'Whats is the best video game?' |
272 | | - <br /> |
273 | | - 'Whats is the best video game. Use Database' |
274 | | - <br /> |
275 | | - 'What is Oracle for Startups? Use Database' |
276 | | - <br /> |
| 272 | + <button onClick={toggleQuestionsVisibility}> |
| 273 | + {isQuestionsVisible ? 'Hide Examples' : 'Show Examples'} |
| 274 | + </button> |
| 275 | + {isQuestionsVisible && ( |
| 276 | + <div> |
| 277 | + <h5>Examples...</h5> |
| 278 | + <ul> |
| 279 | + <li>'What is the latest version of the Oracle Database?'</li> |
| 280 | + <li>'What is the latest version of the Oracle Database? Use Rag.'</li> |
| 281 | + <li>'What is the best video game?'</li> |
| 282 | + <li>'What is the best video game? Use Database'</li> |
| 283 | + <li>'What is Oracle for Startups? Use Database'</li> |
| 284 | + </ul> |
| 285 | + </div> |
| 286 | + )} |
277 | 287 | <span> |
278 | 288 | <button onClick={() => (buttonState ? stopSession() : startSession())}> |
279 | 289 | {buttonState ? "Stop Session and Submit Question" : "Start session and Ask Question"} |
|
0 commit comments