fix
Showing
2 changed files
with
28 additions
and
5 deletions
| ... | @@ -101,12 +101,11 @@ function App() { | ... | @@ -101,12 +101,11 @@ function App() { |
| 101 | } | 101 | } |
| 102 | setChatLog([...chatLogNew, { user: "gpt", message: `${replaceTags}`} ]) | 102 | setChatLog([...chatLogNew, { user: "gpt", message: `${replaceTags}`} ]) |
| 103 | 103 | ||
| 104 | // setChatLog([...chatLogNew, { user: "gpt", message: `<div>${parsedData}</div>`} ]) | ||
| 105 | var scrollToTheBottomChatLog = document.getElementsByClassName("chat-log")[0]; | 104 | var scrollToTheBottomChatLog = document.getElementsByClassName("chat-log")[0]; |
| 106 | scrollToTheBottomChatLog.scrollTop = scrollToTheBottomChatLog.scrollHeight; | 105 | scrollToTheBottomChatLog.scrollTop = scrollToTheBottomChatLog.scrollHeight; |
| 107 | } catch (error) { | 106 | } catch (error) { |
| 108 | const errorMsg = "We are currently experiencing heavy flow as of the moment, please try again."; | 107 | const errorMsg = "We apologize for any inconvenience caused due to the delay in the response time. Please try again."; |
| 109 | setChatLog([...chatLogNew, { user: "gpt", message: `<div class="errormsg">${errorMsg}</div>`} ]) | 108 | setChatLog([...chatLogNew, { user: "gpt", message: `<div class="errormsg"><span>i</span><div class="msg">${errorMsg}</div></div>`} ]) |
| 110 | // res.status(500).send(error || 'Something went wrong'); | 109 | // res.status(500).send(error || 'Something went wrong'); |
| 111 | } | 110 | } |
| 112 | } | 111 | } | ... | ... |
| ... | @@ -3,10 +3,30 @@ | ... | @@ -3,10 +3,30 @@ |
| 3 | } | 3 | } |
| 4 | 4 | ||
| 5 | .errormsg { | 5 | .errormsg { |
| 6 | border: 1px solid red; | 6 | border: 1px solid #7ac5ff; |
| 7 | padding: 15px 25px; | 7 | padding: 15px 25px; |
| 8 | border-radius: 10px; | 8 | border-radius: 10px; |
| 9 | background: rgb(255 0 0 / 15%); | 9 | background: rgb(0 139 245 / 6%); |
| 10 | } | ||
| 11 | |||
| 12 | .errormsg .msg { | ||
| 13 | display: inline-block; | ||
| 14 | width: 90%; | ||
| 15 | font-weight: 600; | ||
| 16 | } | ||
| 17 | .errormsg span { | ||
| 18 | background: #008BF5; | ||
| 19 | padding: 3px 12px; | ||
| 20 | border-radius: 50px; | ||
| 21 | width: 30px; | ||
| 22 | height: 30px; | ||
| 23 | margin-right: 10px; | ||
| 24 | color: #fff; | ||
| 25 | font-weight: 900; | ||
| 26 | display: inline-block; | ||
| 27 | vertical-align: top; | ||
| 28 | font-family: auto; | ||
| 29 | font-size: 20px; | ||
| 10 | } | 30 | } |
| 11 | 31 | ||
| 12 | .side-menu-button { | 32 | .side-menu-button { |
| ... | @@ -182,6 +202,10 @@ code br:nth-child(-n+2) { | ... | @@ -182,6 +202,10 @@ code br:nth-child(-n+2) { |
| 182 | .message { | 202 | .message { |
| 183 | font-size: 14px; | 203 | font-size: 14px; |
| 184 | } | 204 | } |
| 205 | .errormsg { | ||
| 206 | padding: 10px; | ||
| 207 | width: 80%; | ||
| 208 | } | ||
| 185 | .chat-message-center { | 209 | .chat-message-center { |
| 186 | padding: 20px 5vw !important; | 210 | padding: 20px 5vw !important; |
| 187 | } | 211 | } | ... | ... |
-
Please register or sign in to post a comment