feat: improve landing page with how-it-works section and strong CTA#488
feat: improve landing page with how-it-works section and strong CTA#488mahek2016 wants to merge 4 commits intoAOSSIE-Org:mainfrom
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughHome.jsx was restructured: layout changed from full-screen centering to top-aligned min-height, header/logo repositioned, hero/subtitle and feature cards rewritten, buttons relabeled, and new "How It Works", "Why EduAid", and CTA sections added. GitHub stars caching logic and fetch formatting were tightened. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@eduaid_web/src/pages/Home.jsx`:
- Around line 97-109: The Link elements currently wrap native <button> elements
(in Home.jsx render around the "Upload & Generate Quiz" and "View Previous Work"
blocks, and similarly in Text_Input.jsx and Question_Type.jsx), which is
invalid; replace the nested structure by either moving the styling/classes onto
the Link itself and removing the inner <button> (add role="button" and
tabIndex="0" to the Link to preserve accessibility/keyboard behavior) or convert
the outer Link to a programmatic navigation by using the existing navigate
function (e.g., replace Link with a styled <button> that calls navigate('/path')
in its onClick); ensure the className "w-full sm:w-auto flex justify-center
gap-3 text-white px-6 py-3 border-gradient hover:wave-effect rounded-md
transition-all duration-300" is applied to the interactive element and update
Text_Input.jsx and Question_Type.jsx the same way.
|
Thank you for the review. I’ve addressed the suggested improvements:
Please let me know if any further changes are required. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@eduaid_web/src/pages/Home.jsx`:
- Around line 35-39: The cache-hit guard currently coerces possibly-missing
values to numbers (e.g., Number(null) === 0), causing false cache hits; update
the condition around cachedStars and cachedTime to first ensure the raw cached
values are present (non-null/undefined) before calling Number.isFinite and
isMoreThanOneDayOld — i.e., check that cachedStars and cachedTime are not
null/undefined, then convert/validate with Number.isFinite(cachedStars) and
Number.isFinite(cachedTime) and !isMoreThanOneDayOld(cachedTime) so the cache
branch only runs when both keys truly exist and are valid numbers.
- Around line 19-20: Validate the GitHub response before using stargazers_count:
after awaiting response.json() (the variable response and call response.json()),
check response.ok and ensure the parsed object has a numeric
data.stargazers_count; if not, handle the error path (throw a descriptive error
or return a safe fallback like 0) so the caller of this fetch in Home.jsx
doesn't render undefined. Update the function that currently does "const data =
await response.json(); return data.stargazers_count;" to perform these checks
and log or surface the response status and body when invalid.
Addressed Issues:
Fixes #484
Screenshots/Recordings:
Updated landing page with:
Desktop View
Additional Sections View
Additional Notes:
This PR improves the clarity and structure of the landing page to help first-time users understand the product within a few seconds.
Changes made:
All existing features continue to work as expected.
Checklist
AI Usage Disclosure
I have used the following AI models and tools:
Summary by CodeRabbit
New Features
Style