Skip to content

Commit

Permalink
added styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Aryankpoor committed Jul 13, 2024
1 parent 57a4d88 commit 1fb4490
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/components/Main/Main.css
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,32 @@
margin: 15px auto;
text-align: center;
font-weight: 300;
}

.result {
padding: 0px 5%;
max-height: 70vh;
overflow-y: scroll;
}

.result::-webkit-scrollbar{
display: none;
}

.result-title {
margin: 40px 0px;
display: flex;
align-items: center;
gap: 20px;
}

.result img{
width: 40px;
border-radius: 50%;
}

.result-data {
display: flex;
align-items: start;
gap: 20px;
}
11 changes: 11 additions & 0 deletions src/components/Main/Main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ const Main = () => {
</div>
</div>
</>:<div className='result'>
<div className="result-title">
<img src={assets.user_icon} alt="" />
<p>{recentPrompt}</p>
</div>
<div className="result-data">
<img src={assets.gemini_icon} alt="" />
{loading?
<div className='loader'>
</div>}
<p dangerouslySetInnerHTML={{__html:resultData}}></p>
</div>
</div>}


Expand Down
1 change: 1 addition & 0 deletions src/context/Context.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const ContextProvider = (props) => {
setResultData("")
setLoading(true)
setShowResult(true)
setRecentPrompt(input)
const response = await runChat(input)
setResultData(response)
setLoading(false)
Expand Down

0 comments on commit 1fb4490

Please sign in to comment.