diff --git a/src/app/quotes/page.tsx b/src/app/quotes/page.tsx new file mode 100644 index 0000000..6bd17f2 --- /dev/null +++ b/src/app/quotes/page.tsx @@ -0,0 +1,23 @@ +import { Title, Paragraph } from "@/components/general/typography"; +import quotes from "@/components/quote/quotes"; +import Quote from "@/types/quote.type"; + +const Quotes = () => { + return ( + <> + My Favorite Quotes + + {quotes.map((quote: Quote) => ( +
+

{quote.quote}

+

{quote.author}

+
+ ))} + + ); +}; + +export default Quotes; diff --git a/src/components/quote/Quote.tsx b/src/components/quote/Quote.tsx index f7f3d70..f81565f 100644 --- a/src/components/quote/Quote.tsx +++ b/src/components/quote/Quote.tsx @@ -20,7 +20,12 @@ const Quote = () => { } return ( -
+
{ + window.location.href = "/quotes"; + }} + >

{quote.quote}

{quote.author}

diff --git a/src/components/quote/quotes.ts b/src/components/quote/quotes.ts index f07008e..f328eb6 100644 --- a/src/components/quote/quotes.ts +++ b/src/components/quote/quotes.ts @@ -2,70 +2,79 @@ import Quote from "@/types/quote.type"; const quotes: Quote[] = [ { + id: "1a2b3c4d", quote: "If you cannot do great things, do small things in a great way.", author: "Napoleon Hill", }, { + id: "2b3c4d5e", quote: "Everyday life is like programming, I guess. If you love something you can put beauty into it.", author: "Donald Knuth", }, { - quote: - "Everyday life is like programming, I guess. If you love something you can put beauty into it.", - author: "Donald Knuth", - }, - { + id: "3c4d5e6f", quote: "Slowing down is sometimes the best way to speed up.", author: "Mike Vance", }, { + id: "4d5e6f7g", quote: "Focus on one thing, make it your priority, and stick with it no matter what!", author: "Tyler Perry", }, { + id: "5e6f7g8h", quote: "Perseverance is not a long race; it is many short races one after the other.", author: "Walter Elliot", }, { + id: "6f7g8h9i", quote: "There are two kinds of decisions - the right decision and a lesson learned.", author: "Simon Sinek", }, { + id: "7g8h9i0j", quote: - "If you can't fly then run, if you can't run then walk, if you can't walk then crawl, but whatever you do you have to kepp moving forward.", + "If you can't fly then run, if you can't run then walk, if you can't walk then crawl, but whatever you do you have to keep moving forward.", author: "Martin Luther King Jr.", }, { + id: "8h9i0j1k", quote: "Done is better than perfect.", author: "Sheryl Sandberg", }, { + id: "9i0j1k2l", quote: "Focus is about saying, no.", author: "Steve Jobs", }, { + id: "0j1k2l3m", quote: "Examine your values and live by them - the more your actions reflect your beliefs, the better you feel.", author: "American Heart Association", }, { + id: "1k2l3m4n", quote: "The best time to plant a tree was 20 years ago. The second best time is now.", author: "Chinese proverb", }, { - quote: "Continuous improvement is better then delayed perfection.", + id: "2l3m4n5o", + quote: "Continuous improvement is better than delayed perfection.", author: "Mark Twain", }, { + id: "3m4n5o6p", quote: "The only way to go fast is to go well.", author: "Robert C. Martin", }, { + id: "4n5o6p7q", quote: "The meaning of life is to find your gift. The purpose of life is to give it away.", author: "Pablo Picasso", diff --git a/src/types/quote.type.ts b/src/types/quote.type.ts index d54bca6..c18d41b 100644 --- a/src/types/quote.type.ts +++ b/src/types/quote.type.ts @@ -1,4 +1,5 @@ interface Quote { + id: string; quote: string; author: string; }