-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Water @ Hanh Solo Exquisite React Submission #46
base: master
Are you sure you want to change the base?
Changes from 1 commit
914f35d
47a9172
a744ca9
0a781f0
5623e1f
6c329fd
3fc69ff
f8c02a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -43,7 +43,6 @@ const PlayerSubmissionForm = (props) => { | |||||
updateWords(setInitialState()); | ||||||
}; | ||||||
|
||||||
|
||||||
return ( | ||||||
<div className="PlayerSubmissionForm"> | ||||||
<h3>Player Submission Form for Player # { props.index }</h3> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will cause all the tests in
Suggested change
|
||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,13 +3,17 @@ import PropTypes from 'prop-types'; | |
import './RecentSubmission.css'; | ||
|
||
const RecentSubmission = (props) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to note the tests for this component are passing, so you didn't need to skip them. |
||
return ( | ||
<div className="RecentSubmission"> | ||
<h3>The Most Recent Submission</h3> | ||
<p className="RecentSubmission__submission">{ props.submission }</p> | ||
</div> | ||
); | ||
} | ||
if (props.submission) { | ||
return ( | ||
<div className="RecentSubmission"> | ||
<h3>The Most Recent Submission</h3> | ||
<p className="RecentSubmission__submission">{ props.submission }</p> | ||
</div> | ||
); | ||
} else { | ||
return (null) | ||
} | ||
}; | ||
|
||
RecentSubmission.propTypes = { | ||
submission: PropTypes.string.isRequired, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
const FinalPoem = (props) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure what this file is for. |
||
|
||
if (props.isRevealed) { | ||
|
||
//event handler | ||
const showButton= (event) => { | ||
|
||
return ( | ||
<div className="FinalPoem"> | ||
<section className="FinalPoem__poem"> | ||
<h3>Final Poem</h3> | ||
</section> | ||
|
||
<div className="FinalPoem__reveal-btn-container"> | ||
<input | ||
type="button" value="We are finished: Reveal the Poem" | ||
className="FinalPoem__reveal-btn" | ||
onClick={ props.revealPoem } | ||
/> | ||
<section> | ||
{(props.submissions).map((string, index) => ( | ||
<p key={index}> | ||
{string} | ||
</p> | ||
))} | ||
</section> | ||
</div> | ||
</div> | ||
)} | ||
else { | ||
return( | ||
<div className="FinalPoem"> | ||
<section className="FinalPoem__poem"> | ||
<h3>Final Poem</h3> | ||
</section> | ||
|
||
<div className="FinalPoem__reveal-btn-container"> | ||
<input | ||
type="button" value="We are finished: Reveal the Poem" | ||
className="FinalPoem__reveal-btn" | ||
onClick={ props.revealPoem } | ||
/> | ||
</div> | ||
</div> | ||
)} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note that it looks like the tests are failing because you used different props like
isRevealed
instead ofisSubmitted
. That's why it looks like the tests are failing.