1- import React from 'react' ;
1+ import React , { useContext } from 'react' ;
22import PropTypes from 'prop-types' ;
33import Card from '@mui/material/Card' ;
44import CardContent from '@mui/material/CardContent' ;
@@ -11,13 +11,6 @@ import Avatar from '@mui/material/Avatar';
1111import { getAvatarURL } from '../../../api/api.js' ;
1212import FeedbackAnswerInput from '../../feedback_answer_input/FeedbackAnswerInput' ;
1313
14- const propTypes = {
15- responderId : PropTypes . string . isRequired ,
16- answer : PropTypes . string , // Allow answer to be null or undefined
17- inputType : PropTypes . string . isRequired ,
18- sentiment : PropTypes . number
19- } ;
20-
2114const FeedbackResponseCard = props => {
2215 const { state } = useContext ( AppContext ) ;
2316 const userInfo = selectProfile ( state , props . responderId ) ;
@@ -59,10 +52,10 @@ const FeedbackResponseCard = props => {
5952
6053FeedbackResponseCard . propTypes = {
6154 responderId : PropTypes . string . isRequired ,
62- answer : PropTypes . string . isRequired ,
55+ answer : PropTypes . string ,
6356 inputType : PropTypes . string . isRequired ,
6457 sentiment : PropTypes . number ,
65- handleDenyClick : PropTypes . func . isRequired
58+ handleDenyClick : PropTypes . func
6659} ;
6760
6861export default FeedbackResponseCard ;
0 commit comments