Skip to content

Commit

Permalink
Merge pull request #3 from Yidoon/feat/display-question-after-continu…
Browse files Browse the repository at this point in the history
…e-asking

Display question after continue asking
  • Loading branch information
KevinZonda authored Jan 8, 2024
2 parents 65b977f + 6d15c34 commit 13125a2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const Content = observer((
marginBlockEnd: 0,
textAlign: 'left'
}}>{'🤔 Question'}</h3>
<p style={{textAlign: 'left', fontSize: '16px', paddingBottom: 0, marginBlockStart: 0}}>
<p style={{textAlign: 'left', fontSize: '20px', paddingBottom: 0, marginBlockStart: 0, fontWeight: 'bold'}}>
{question}
</p>
</>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/ContentLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const ContentLayout = observer(() => {
text={v.answer} evidenceList={v.evidence}
question={v.question} failed={false}
shareId={v.shareId}
key={v.shareId}
/>
<div style={{height: '18px'}}></div>
</>
Expand All @@ -33,7 +34,7 @@ export const ContentLayout = observer(() => {
<ContentLayoutItem
isMobile={isMobile} loading={ReqStore.isLoading}
text={ReqStore.currentAns} evidenceList={ReqStore.evidenceList}
question={''} failed={ReqStore.isFailed}
question={ReqStore.currentQuestion} failed={ReqStore.isFailed}
shareId={ReqStore.shareId}
/>

Expand Down
2 changes: 2 additions & 0 deletions frontend/src/Store/ReqStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class reqStore {
public question = ''
public warning = ''
public currentAns: string = ''
public currentQuestion: string = ''
private _currentHistory = ''
public prevQA: PrevAnsItem[] = []
private _parentId = ''
Expand Down Expand Up @@ -176,6 +177,7 @@ class reqStore {
if (this.isLoading) return
this.resetCore()
this.isLoading = true
this.currentQuestion = question
const fresp = fetch(continueAPI, {
method: 'POST',
headers: {
Expand Down

0 comments on commit 13125a2

Please sign in to comment.