-
Notifications
You must be signed in to change notification settings - Fork 145
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
Fannys happy-thought-app #101
base: main
Are you sure you want to change the base?
Conversation
…ling for the displayed messages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kudos for creating your own timeAgo function! Next time maybe you want to try an external library 😉
Good job following the design so well!
All in all you've followed the requirements, but I left some comments for you to think about for upcoming projects 😊
<link | ||
href="https://fonts.googleapis.com/css2?family=Inconsolata:[email protected]&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" | ||
rel="stylesheet"> | ||
<title>Fannys Happy Thought App</title> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⭐
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One empty line is enough
<> | ||
<ThoughtPage /> | ||
</> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for React fragment if you're only returning one element
@@ -0,0 +1,166 @@ | |||
.thought-list { | |||
list-style-type: none; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please set your VSC so one tab = 2 spaces. It gets easier to read
import "./DisplayThought.css" | ||
|
||
export const DisplayThoughts = ({ happyThoughts, isLoading, postLike }) => { | ||
if (isLoading) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here - hard to read with this super big indentation 😅
import { useState, useEffect } from 'react' | ||
import { DisplayThoughts } from "./DisplayThought" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consistency with single or double quotes please
//postcall for likes on thoughts | ||
const postLike = async (thoughtId) => { | ||
try { | ||
const response = await fetch(LIKE_URL.replace("THOUGHT_ID", thoughtId), { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha - nice hack!
Netlify link
https://fh-happythoughtsapp.netlify.app