nss-day-cohort-46 / How-to-Ask-for-Help

0 stars 0 forks source link

Need to grab the id of the quote currently rendered when the "add note" button is clicked #189

Closed powellmad closed 3 years ago

powellmad commented 3 years ago

Ticket MUST be completed before getting help from an instructor

Name: Madison

Breakout Room:

Have you searched the other issue tickets? If not, do that first.

REQUIRED Add Tags to Issue Ticket and Assign to Project Board

REQUIRED Describe your issue:

I am in the weeds trying to figure out how to grab the id of the random quote listed when a button is clicked. I have gotten some hints, but I need a little more hands on help at this point.

REQUIRED Copy/paste any error messages that appear:

REQUIRED What have you googled? (You must have at least 3 links related to your issue)

REQUIRED: What have you tried? Tell us everything you have tried.

I have asked other students in breakout rooms and run it quickly by sage, read through kennels, thought through the logic, rubber ducked to no one about it, banged my head against the table..... please send help

REQUIRED: Copy/paste link TO THE FILE on your branch that you are having issues with

Your link: https://github.com/powellmad/light-side/blob/127dc2bf10043b4084fbed09c8d5f40574bbb9e3/src/components/quotes/QuoteSelection.js#L31

Code Snippet

return (
    <div className="quoteComponent">
        <div className="quote-selection">
        <QuoteCard quote={randomQuoteId}/>
        </div>    

        <button onClick={() => {history.push("/")}}>
          Next Quote
        </button>

        <button onClick={() => {history.push("/notes/create")}}>
          Add Note
        </button>
    </div>
  )