Skip to content

Commit

Permalink
Merge pull request #357 from denektenina/close_sidebar
Browse files Browse the repository at this point in the history
Made second click on open-sidebar-icon close sidebar
  • Loading branch information
denektenina authored Jan 29, 2021
2 parents cd6cfb8 + 02231c2 commit e885b62
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/src/views/Evaluation/FollowUp/FollowUpView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ const FollowUpView = ({ evaluation }: FollowUpViewProps) => {
const barrierQuestions = questions.filter(q => q.barrier === selectedBarrier)

const onQuestionSummarySelected = (question: Question, questionNumber: number) => {
if (selectedQuestion && question.id === selectedQuestion.id) {
setSelectedQuestion(undefined)
setSelectedQuestionNumber(undefined)
return
}
setSelectedQuestion(question)
setSelectedQuestionNumber(questionNumber)
}
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/views/Evaluation/Preparation/PreparationView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ const PreparationView = ({ evaluation, onNextStepClick, onProgressParticipant }:
const disableAllUserInput = isEvaluationFinishedHere || !participantAllowed || !hasParticipantBeenHere

const onQuestionSummarySelected = (question: Question, questionNumber: number) => {
if (selectedQuestion && question.id === selectedQuestion.id) {
setSelectedQuestion(undefined)
setSelectedQuestionNumber(undefined)
return
}
setSelectedQuestion(question)
setSelectedQuestionNumber(questionNumber)
}
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/views/Evaluation/Workshop/WorkshopView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ const WorkshopView = ({ evaluation, onNextStepClick, onProgressParticipant }: Wo
const questions = evaluation.questions

const onQuestionSummarySelected = (question: Question, questionNumber: number) => {
if (selectedQuestion && question.id === selectedQuestion.id) {
setSelectedQuestion(undefined)
setSelectedQuestionNumber(undefined)
return
}
setSelectedQuestion(question)
setSelectedQuestionNumber(questionNumber)
}
Expand Down

0 comments on commit e885b62

Please sign in to comment.