Skip to content

Commit

Permalink
feat: reset tags on clickin new question
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeSlain committed Nov 8, 2024
1 parent 9a61c03 commit d861431
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/Meeting/MeetingCurrentResponse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const MeetingCurrentResponse = function MeetingCurrentResponse({
<GlobalRowContainer extraClass="fr-grid-row fr-mt-5w">
<MeetingMainResponse setQuestion={setQuestion} setContext={setContext} />
{chatId !== 0 && lastStreamId !== 0 && <MeetingAdditionalResponse />}
{!chatId && <MeetingFirstQuestionHelper />}
{!chatId && <MeetingFirstQuestionHelper setContext={setContext} />}
</GlobalRowContainer>
<div ref={refBottom} />
</div>
Expand Down
14 changes: 13 additions & 1 deletion src/components/Meeting/MeetingFirstQuestionSidePanel.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
import type { MeetingInputContext } from '@types'
import { GlobalColContainer } from 'components/Global/GlobalColContainer'
import { OneThirdScreenWidth } from 'components/Global/OneThirdScreenWidth'
import { useEffect } from 'react'

export function MeetingFirstQuestionHelper(setQuestionInput) {
export function MeetingFirstQuestionHelper({
setContext,
}: {
setContext: React.Dispatch<React.SetStateAction<MeetingInputContext>>
}) {
useEffect(() => {
setContext({
administrations: [],
themes: [],
})
}, [])
return (
<OneThirdScreenWidth>
<GlobalColContainer>
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default () => {
},
host: true,
strictPort: true,
port: 4173,
port: 4172,
},
base: '/',
})
Expand Down

0 comments on commit d861431

Please sign in to comment.