Skip to content
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

Placeholder tree component #6

Closed
9 tasks done
scottrohrig opened this issue Apr 8, 2022 · 4 comments
Closed
9 tasks done

Placeholder tree component #6

scottrohrig opened this issue Apr 8, 2022 · 4 comments
Assignees

Comments

@scottrohrig
Copy link
Owner

scottrohrig commented Apr 8, 2022

Description

A JSX component that stands in place of an empty orchard plot of land, with a button to purchase a tree.

HTML

The returning JSX from the component should include :

  • item container - to keep all items and trees the correct size
  • image or background image to signify there is a space for the tree to be planted
  • purchase button with an onClick attribute to handlePurchase function

JavaScript

  • imports
  • component function
  • handlePurchase function to handle the button onClick event
  • how does this placeholder know which orchard to add a tree to?
    • should we use useParams and get the orchardId?
  • export component
@scottrohrig scottrohrig mentioned this issue Apr 8, 2022
8 tasks
@stuart-rickard
Copy link
Collaborator

thanks for writing this up, Scott! I will take a shot at it!

@stuart-rickard
Copy link
Collaborator

PlaceholderTree is working, except that it doesn't know which orchard to add a tree to.

@stuart-rickard stuart-rickard self-assigned this Apr 9, 2022
@scottrohrig
Copy link
Owner Author

Glad it's working! It was helpful when making the placeholder for the juicer.

@stuart-rickard The orchard id is a param from the url.

@stuart-rickard
Copy link
Collaborator

This issue is closed - the final unchecked boxes aren't relevant as we aren't using multiple orchards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants