-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Certificate btn on last #146
base: main
Are you sure you want to change the base?
Conversation
@JeelRajodiya I test it on all scenarios
Please review and let me know if there any thing need to improve. |
Screencast.from.2025-03-16.10-25-37.webmI made some changes in the condition. Now, whenever a user finishes the last lesson—whether it is the first, middle, or last—it will render the 'Get Your Certificate' button. |
@JeelRajodiya Please review the PR |
I have test it around multiple scenarios , it is working fine. Let me know if there are any issues. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a feature to display a certificate button when the user reaches the final lesson and completes the tour. Key changes include updating function imports, adding state and an effect to detect tour completion, and conditionally displaying the CertificateButton component.
Comments suppressed due to low confidence (1)
app/components/CodeEditor/CodeEditor.tsx:141
- [nitpick] The fragment wrapping CertificateButton appears unnecessary. Removing the fragment could simplify the JSX and improve readability.
<> <CertificateButton /> </>
I removed the fragments as well. @JeelRajodiya Please let me know if there any changes need to made. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new feature that displays a certificate button when the user is at the last lesson and has completed the tour.
- Added a CertificateButton component import and integration in the code editor controls.
- Introduced state management to determine if the tour has been completed.
Comments suppressed due to low confidence (1)
app/components/CodeEditor/CodeEditor.tsx:116
- [nitpick] Consider renaming 'isTheTourCompletedState' to 'isTourCompleted' for brevity and consistency with the imported 'isTheTourCompleted' function.
const [isTheTourCompletedState, setIsTheTourCompletedState] = useState(false);
What kind of change does this PR introduce?
feature
Issue Number:
Screenshots/videos:
Screencast from 2025-03-14 21-09-26.webm
Summary
Add a button of get your certificate when user is at last lesson and complete the tour.
Does this PR introduce a breaking change?
No