Cleanup references to old services, rename merch to store#272
Cleanup references to old services, rename merch to store#272devksingh4 merged 6 commits intomainfrom
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. WalkthroughThis PR removes separate event and merch-paid page components and replaces merch-store routes with store routes. It deletes environment variable entries for ticketing, membership, and merch APIs across development, staging, and production .env files. Redirects for per-id event and merch paths were removed and a /merch -> /store redirect was added. Multiple components and navigation entries were updated to use /store and /store/item routes (including CalendarEventDetail, EventCard, Navbar, and several store-related pages), and a new /store/paid page component was introduced. Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 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 |
Deploying with Cloudflare Pages
|
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Fix all issues with AI agents
In `@src/app/`(membership)/store/item/page.tsx:
- Around line 547-548: Replace the relative redirect path with the absolute path
for consistency: update the window.location.replace('../store') call to use
'/store' so it matches the absolute route used elsewhere (e.g., the `/store`
usage at line 243); ensure the change is made where the redirect occurs (the
window.location.replace(...) call) and keep the returned <Layout name="Store">
unchanged.
- Around line 407-408: The redirect paths for the guest checkout are wrong;
update the values for successRedirPath and cancelRedirPath (the properties in
the guest checkout payload) so successRedirPath is "/store/paid" (not
"/store-paid") and cancelRedirPath is "/store/item?id=${itemid}" (include the
"item" segment and interpolate itemid variable); locate the object/handler that
sets successRedirPath and cancelRedirPath in the guest checkout flow and replace
the two strings accordingly.
In `@src/app/`(membership)/store/page.tsx:
- Line 93: The href value in the JSX (href={'../store/item?id=' +
val['item_id']}) is using a fragile relative path; update the href to an
absolute path (e.g., '/store/item?id=' + val['item_id'] or using a template
string) in the component in page.tsx so it becomes '/store/item?id={item_id}'
(reference the JSX expression that builds href and the val['item_id'] variable)
to ensure stability if file structure changes.
In `@src/app/`(membership)/store/paid/page.tsx:
- Line 28: The Layout component instance in the paid store page is missing the
name prop; update the Layout usage to include name="Store" to match other store
pages (refer to Layout in store/page.tsx and store/item/page.tsx) so the prop is
passed consistently across pages.
- Around line 2-15: Remove the unused imports in this module: delete useState
from the React import, remove useSearchParams, drop axios, and drop
transformApiResponse; update the import block near the top of
src/app/(membership)/store/paid/page.tsx so only used symbols remain (e.g.,
Suspense, useEffect, Modal components, Lottie, Layout, successAnimation), and
ensure no code references the removed identifiers before committing.
| size="lg" | ||
| as={Link} | ||
| href={'../merch?id=' + val['item_id']} | ||
| href={'../store/item?id=' + val['item_id']} |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Consider using absolute path for href.
The relative path ../store/item?id= works but is fragile if the file structure changes. Using an absolute path improves clarity and maintainability.
Suggested change
<Button
color="primary"
size="lg"
as={Link}
- href={'../store/item?id=' + val['item_id']}
+ href={'/store/item?id=' + val['item_id']}
>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| href={'../store/item?id=' + val['item_id']} | |
| href={'/store/item?id=' + val['item_id']} |
🤖 Prompt for AI Agents
In `@src/app/`(membership)/store/page.tsx at line 93, The href value in the JSX
(href={'../store/item?id=' + val['item_id']}) is using a fragile relative path;
update the href to an absolute path (e.g., '/store/item?id=' + val['item_id'] or
using a template string) in the component in page.tsx so it becomes
'/store/item?id={item_id}' (reference the JSX expression that builds href and
the val['item_id'] variable) to ensure stability if file structure changes.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Summary by CodeRabbit
Refactor
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.