-
- {
- // Put your form inputs here... We've put in one below as an example
- }
+ The
-
+
+
+
+ The
+
+
+ .
@@ -27,5 +111,9 @@ const PlayerSubmissionForm = () => {
);
}
+PlayerSubmissionForm.propTypes = {
+ onCallBackPoem: PropTypes.func.isRequired,
+};
+
export default PlayerSubmissionForm;
diff --git a/src/components/RecentSubmission.js b/src/components/RecentSubmission.js
index 663da34b..8747279b 100644
--- a/src/components/RecentSubmission.js
+++ b/src/components/RecentSubmission.js
@@ -1,13 +1,27 @@
import React from 'react';
import './RecentSubmission.css';
+import PropTypes from "prop-types"
const RecentSubmission = (props) => {
+
+ const {firstAdjective, firstNoun, adverb, verb, secondAdjective, secondNoun} = props.poem;
return (
The Most Recent Submission
-
{ }
+
{`The ${firstAdjective} ${firstNoun} ${adverb} ${verb} the ${secondAdjective} ${secondNoun}`}
);
}
-export default RecentSubmission;
+RecentSubmission.propTypes = {
+ poem: PropTypes.shape({
+ firstAdjective: PropTypes.string.isRequired,
+ firstNoun: PropTypes.string.isRequired,
+ adverb: PropTypes.string.isRequired,
+ verb: PropTypes.string.isRequired,
+ secondAdjective: PropTypes.string.isRequired,
+ secondNoun: PropTypes.string.isRequired,
+ })
+};
+
+export default RecentSubmission;
\ No newline at end of file