https://music-quote.vercel.app/
The project uses React JS as the frontend library and Bootstrap as the CSS framework. The data of the quotes was collected inside a JavaScript array of objects so then it could be randomized when the user clicked on the button. The useState hook was used to rerender the DOM based on the quote selected by the randomizer. Besides that, user can also share the quote on their X/Twitter account directly. The quote text was passed into the X/Twitter intent URL as a query so all they had to do was click the button, and post the tweet.
- June 8, 2024: Color changed on quote randomize
- May 28, 2024: Project launched
-
I can see a wrapper element with a corresponding
id="quote-box"
. -
Within
#quote-box
, I can see an element with a correspondingid="text"
. -
Within
#quote-box
, I can see an element with a correspondingid="author"
. -
Within
#quote-box
, I can see a clickable element with a correspondingid="new-quote"
. -
Within
#quote-box
, I can see a clickablea
element with a correspondingid="tweet-quote"
. -
On first load, my quote machine displays a random quote in the element with
id="text"
. -
On first load, my quote machine displays the random quote's author in the element with
id="author"
. -
When the
#new-quote
button is clicked, my quote machine should fetch a new quote and display it in the#text
element. -
My quote machine should fetch the new quote's author when the
#new-quot
e button is clicked and display it in the#author
element. -
I can tweet the current quote by clicking on the
#tweet-quote
a
element. Thisa
element should include the"twitter.com/intent/tweet"
path in itshref
attribute to tweet the current quote. -
The
#quote-box
wrapper element should be horizontally centered. Please run tests with browser's zoom level at 100% and page maximized.
Visit the test deployment