dekiru2022 / dekiru

0 stars 0 forks source link

質問者が、質問一覧画面にて本人の質問はIndexResolverに遷移 #31

Closed dekiru2022 closed 2 years ago

dekiru2022 commented 2 years ago

filterで排除する

dekiru2022 commented 2 years ago

indexQuestion.jsxの128行目に以下(★)を追加

Tab

          {
                questions.map((question, i) => {
                ★if(question.userId != cognitoId){
                    return (
                        <>
                            <Grid item xs={6}>
                                <QuestionCardResolver question={question} />
                            </Grid>
                            {(() => {
                                if ((questions.length === i) && ((questions.length % 2) === 1)) {
                                    return (
                                        <Grid item xs={6}></Grid>
                                    )
                                }
                            })()}
                        </>
                    )
                        }
                })
            }