This repository was archived by the owner on Apr 21, 2025. It is now read-only.
Conversation
|
There was a problem hiding this comment.
Pull Request Overview
This PR introduces updates for the v1.4.4 release with enhancements in payment checking, course card UI behavior, and middleware routing. Key changes include:
- Enhancements in the payment verification logic by adding an "isRedirect" parameter and modifying the flow.
- Updates to the CourseCard component to handle purchase status via dynamic action buttons and a login-required dialog.
- Minor UI improvements in page loading and route middleware adjustments to reflect updated route protection policies.
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/services/custom/course/checkPayment.ts | Updated payment check logic with an added isRedirect parameter and early return handling for empty payments. |
| src/components/learners/courses/course/course-detail/CourseCard.tsx | Updated functionality in purchase handling and UI indication based on course purchase status. |
| src/app/(learners)/courses/[id]/page.tsx | Replaced temporary loading text with a Loading component. |
| src/middlewares/clerk-middleware.ts | Removed the courses route from protected routes, potentially altering access. |
| src/components/learners/courses/course/course-detail/CourseDetail.tsx | Removed an outdated comment regarding redirect behavior in non-admin views. |
| src/services/api/course.ts | Removed a redundant comment in course viewability check logic. |
Files not reviewed (1)
- package.json: Language not supported
Comments suppressed due to low confidence (2)
src/services/custom/course/checkPayment.ts:17
- When payments is empty and isRedirect is true, the function returns false immediately without triggering redirection. Consider revisiting this logic to ensure that users are redirected appropriately if that is the intent.
if (!payments || payments.length === 0) { return false; }
src/middlewares/clerk-middleware.ts:9
- The removal of the '/courses(.*)' route from protected routes may expose course-related endpoints. Confirm that this change aligns with your intended security policy.
'/courses(.*)',
bakaqc
approved these changes
Mar 27, 2025
hardingadonis
approved these changes
Mar 27, 2025
yuhtnguyen
approved these changes
Mar 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.