Skip to content

Feat/clickable logo#6

Merged
vallabhatech merged 3 commits into
vallabhatech:mainfrom
Rohan-Shridhar:feat/clickable-logo
May 29, 2026
Merged

Feat/clickable logo#6
vallabhatech merged 3 commits into
vallabhatech:mainfrom
Rohan-Shridhar:feat/clickable-logo

Conversation

@Rohan-Shridhar

@Rohan-Shridhar Rohan-Shridhar commented May 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Wrapped the logo "CareSync" in anchor tag to redirect to dashboard

Related Issue

Fixes #5

Type of Change

  • ✨ New feature / grid utility
  • 🎨 UI improvement

Screenshots / Recording

Demo_video.mp4

How to Test

  1. Open http://localhost:3000/
  2. Notice that the cursor becomes a pointer when hover over the logo
  3. Clicking CareSync redirects to dashboard

Checklist

  • My code runs without errors
  • I tested the change in a browser
  • PR is focused on a single feature or fix
  • No new dependencies added (or, if added, justified above)
  • Updated documentation if behavior changed

Summary by CodeRabbit

  • New Features
    • Made the brand name in the navigation bar clickable, allowing users to quickly navigate back to the home page by clicking the brand text.

Review Change Stack

@vercel

vercel Bot commented May 29, 2026

Copy link
Copy Markdown

@Rohan-Shridhar is attempting to deploy a commit to the vallabhatech's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented May 29, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The "CareSync" navbar brand is wrapped in an anchor element pointing to the root path, making the logo clickable and enabling users to return to the home page from any page in the application.

Changes

Navbar Logo Navigation

Layer / File(s) Summary
Logo clickable navigation
src/App.jsx
The navbar brand "CareSync" is wrapped in an anchor element with href="/" and inherited link styling (color: 'inherit', textDecoration: 'none'), enabling navigation to the home page when clicked.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A logo now leads the way,
Click it from anywhere, any day!
Back to home with just one tap,
No more wandering off the map! 🏠

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Feat/clickable logo' is clear, specific, and directly relates to the main change of wrapping the CareSync logo in a clickable anchor tag.
Linked Issues check ✅ Passed The PR fully addresses issue #5 by wrapping the CareSync logo in an anchor tag pointing to '/' to make it clickable and enable navigation to the homepage.
Out of Scope Changes check ✅ Passed The PR contains only the targeted change of making the logo clickable with no additional out-of-scope modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/App.jsx`:
- Around line 258-260: Replace the plain anchor used for the brand in App.jsx
with a react-router Link so navigation uses client-side routing and make both
the icon and the "CareSync" text one clickable element; import { Link } from
'react-router-dom' if missing, replace the <a href="/"> wrapper around
"CareSync" with <Link to="/"> and move the icon JSX inside that same Link,
preserving the existing inline styles and accessibility attributes
(aria-label/role) so the whole brand (icon + text) behaves as a single SPA link.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a8fba185-40f8-4fc3-9674-4d0493525028

📥 Commits

Reviewing files that changed from the base of the PR and between bf8a475 and e4293d0.

📒 Files selected for processing (1)
  • src/App.jsx

Comment thread src/App.jsx
Comment on lines +258 to +260
<a href="/" style={{ color: 'inherit', textDecoration: 'none' }}>
CareSync
</a>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify plain anchors are used for internal routes in router-managed UI.
# Expected: show the brand anchor usage and nearby router context.
rg -n -C3 '<a\s+href="/"' src/App.jsx
rg -n -C3 'import\s*\{[^}]*\bLink\b' src/App.jsx
rg -n -C3 '<Routes>|<Route\s+path=' src/App.jsx

Repository: vallabhatech/CareSync

Length of output: 1316


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Check whether Box is imported/available in src/App.jsx (needed for the suggested diff)
rg -n "import\s*\{[^}]*\bBox\b[^}]*\}\s*from\s*'`@mui/material`'" src/App.jsx || true
rg -n "import\s+\w+\s+from\s*'`@mui/material`'" src/App.jsx || true
rg -n "from\s*'`@mui/material`'" src/App.jsx || true

# Also show the top import block for quick context
sed -n '1,80p' src/App.jsx

Repository: vallabhatech/CareSync

Length of output: 2443


🏁 Script executed:

#!/bin/bash
set -euo pipefail
rg -n '<a\s+href="/' src/App.jsx || true

Repository: vallabhatech/CareSync

Length of output: 145


Use Link for the brand (and wrap icon + text in one clickable element).

src/App.jsx uses <a href="/"> for the internal / route, which bypasses SPA client-side navigation; additionally, only the “CareSync” text is inside the anchor while the icon is not clickable. Replace the anchor with a router Link-backed component and include both icon + text in the same clickable wrapper.

Suggested diff
-        <LocalHospitalIcon sx={{ mr: 1 }} />
-        <Typography variant="h6" fontWeight={700} sx={{ flexGrow: 1 }}>
-          <a href="/" style={{ color: 'inherit', textDecoration: 'none' }}>
-          CareSync
-          </a>
-        </Typography>
+        <Box
+          component={Link}
+          to="/"
+          sx={{
+            display: 'flex',
+            alignItems: 'center',
+            flexGrow: 1,
+            color: 'inherit',
+            textDecoration: 'none',
+          }}
+        >
+          <LocalHospitalIcon sx={{ mr: 1 }} />
+          <Typography variant="h6" fontWeight={700}>
+            CareSync
+          </Typography>
+        </Box>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/App.jsx` around lines 258 - 260, Replace the plain anchor used for the
brand in App.jsx with a react-router Link so navigation uses client-side routing
and make both the icon and the "CareSync" text one clickable element; import {
Link } from 'react-router-dom' if missing, replace the <a href="/"> wrapper
around "CareSync" with <Link to="/"> and move the icon JSX inside that same
Link, preserving the existing inline styles and accessibility attributes
(aria-label/role) so the whole brand (icon + text) behaves as a single SPA link.

@Rohan-Shridhar

Copy link
Copy Markdown
Contributor Author

@vallabhatech , I have opened the PR, feel free to request changes if necessary!!

@vallabhatech vallabhatech merged commit 20e4a65 into vallabhatech:main May 29, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Make the logo clickable and redirect users to the home page

2 participants