This repository has been archived by the owner on May 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from iAmAnsari/ilm
Adding a Score window compliting the project as a app.
- Loading branch information
Showing
5 changed files
with
78 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import React from 'react'; | ||
|
||
const Score = ({waste, weight}) => { | ||
if((waste.length)+weight>=100){ | ||
return ( | ||
<div> | ||
<h1>Congrats</h1> | ||
<h1>You are a Recycling King</h1> | ||
</div> | ||
); | ||
} | ||
else if((waste.length)+weight>=50 && (waste.length)+weight<100){ | ||
return( | ||
<div> | ||
<h1>Congrats</h1> | ||
<h1>You are a good Recycler</h1> | ||
</div> | ||
); | ||
} | ||
else if((waste.length)+weight<50 && (waste.length)+weight>0){ | ||
return( | ||
<div> | ||
<h1>Congrats</h1> | ||
<h1>You did good but do better next time.</h1> | ||
</div> | ||
); | ||
} | ||
else if((waste.length)+weight==0){ | ||
return( | ||
<div> | ||
<h1>Fill the form to know your status</h1> | ||
</div> | ||
); | ||
} | ||
else{ | ||
return( | ||
<div> | ||
<h1>ERROR: Fill the correct information</h1> | ||
</div> | ||
); | ||
} | ||
|
||
} | ||
|
||
export default Score; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters