Skip to content
Snippets Groups Projects
Unverified Commit 7e7dc094 authored by Todd Dembrey's avatar Todd Dembrey Committed by GitHub
Browse files

Merge pull request #918 from OpenTechFund/bugfix/round-746-not-rendering

Add in text answer type and fallback to Basic Answer if nothing defined
parents 366b5637 5e823733
No related branches found
No related tags found
No related merge requests found
......@@ -58,6 +58,7 @@ AddressAnswer.propTypes = {answer: PropTypes.objectOf(PropTypes.string)}
const answerTypes = {
'no_response': BasicAnswer,
'char': BasicAnswer,
'text': BasicAnswer,
'email': BasicAnswer,
'name': BasicAnswer,
'value': BasicAnswer,
......@@ -86,7 +87,7 @@ export const answerPropTypes = PropTypes.oneOfType([
])
const Answer = ({ answer, type }) => {
const AnswerType = answerTypes[type];
const AnswerType = answerTypes[type] || BasicAnswer;
return <AnswerType answer={answer} />;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment