Skip to content

Added PR for happythoughts#62

Open
daniellauding wants to merge 11 commits intoTechnigo:mainfrom
daniellauding:main
Open

Added PR for happythoughts#62
daniellauding wants to merge 11 commits intoTechnigo:mainfrom
daniellauding:main

Conversation

@daniellauding
Copy link


const days = Math.floor(hours / 24);
return `${days} days ago`;
}; No newline at end of file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean and easy-to-read implementation 👍
I really like how explicit the calculations are — it makes the logic very clear and predictable.

As an optional idea, using a library like moment.js (or dayjs) could make this even shorter and more concise :D

import Thoughts from "./components/Thoughts";

export const App = () => {
return (

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like how the layout is kept simple and readable, and the Tailwind classes are applied very consistently. The dark mode support and smooth color transition are a nice touch as well — it makes the UI feel polished 🔥

}
}}
>
<span aria-hidden="true">❤️</span>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job on accessibility as well 😀
The aria-label, sr-only text, keyboard handling, and disabled state are all thoughtfully implemented. Small touches like the animation for new thoughts and the relative time display make the UX feel polished!


const [message, setMessage] = useState<string>("")

const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like how the submit logic prevents empty or whitespace-only messages)

}

return data;
})

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job on the handleSubmitThought function! 👏
I really like how you handle the POST request: you parse the response, check res.ok, and provide a friendly error message for the user

@media (prefers-reduced-motion: reduce) {
.transition-colors {
transition: none;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow, cool how you structured the font imports and custom properties (--body-font-family, --number-font-family) — it makes the typography consistent and easy to maintain. The dark mode variables and prefers-color-scheme media query are implemented cleanly, and the new-thought-animation adds a nice touch of polish. Accessibility helpers like .sr-only and .focus-ring are also thoughtfully included. Overall, very well-organized and readable CSS

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

Successfully merging this pull request may close these issues.

3 participants