Skip to content

Fix/company card routing student layout#325

Merged
Sachinchaurasiya360 merged 3 commits into
Sachinchaurasiya360:mainfrom
Harkiratcodess:fix/company-card-routing-student-layout
May 21, 2026
Merged

Fix/company card routing student layout#325
Sachinchaurasiya360 merged 3 commits into
Sachinchaurasiya360:mainfrom
Harkiratcodess:fix/company-card-routing-student-layout

Conversation

@Harkiratcodess
Copy link
Copy Markdown
Contributor

Fixes #128

Problem

On /student/companies, clicking a CompanyCard or YCCard always
routed to the public page (/companies/:slug or /yc/:slug),
throwing students out of the student layout context.

Root Cause

CompanyCard and YCCard had hardcoded links and were unaware of
the current layout context, unlike InterviewCompanyCard which
already handled this correctly via an insideLayout prop.

Fix

Passed insideLayout prop to both CompanyCard and YCCard,
same pattern already used by InterviewCompanyCard. When inside
the student layout, links are prefixed with /student.

  • CompanyCard/student/companies/:slug inside layout
  • YCCard/student/yc/:slug inside layout

Files Changed

  • client/src/module/student/companies/CompanyListPage.tsx

Note

Unable to demonstrate via video as no company data is available
in the dev environment. Happy to record once data is seeded or
maintainer can verify directly on staging.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 18, 2026

Warning

Rate limit exceeded

@Harkiratcodess has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 30 minutes and 18 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 29d2b5e0-3573-44d7-82cf-a8d85bc59ca2

📥 Commits

Reviewing files that changed from the base of the PR and between 3552efa and bc45fd1.

📒 Files selected for processing (2)
  • client/src/components/Navbar.tsx
  • client/src/module/student/companies/CompanyListPage.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

@Sachinchaurasiya360 Sachinchaurasiya360 merged commit bc45fd1 into Sachinchaurasiya360:main May 21, 2026
1 check passed
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.

Fix: CompanyCard and YCCard always link to public route, not layout-aware route

2 participants