-
Notifications
You must be signed in to change notification settings - Fork 50
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
Skeleton Hotfix #708
base: develop
Are you sure you want to change the base?
Skeleton Hotfix #708
Conversation
Vercel Preview URL 🚀 : https://planner-j4xsyim9k-utdnebula.vercel.app |
Vercel Preview URL 🚀 : https://planner-qia4bszxp-utdnebula.vercel.app |
@@ -151,7 +151,7 @@ export const MemoizedSemesterCourseItem = React.memo( | |||
)} | |||
</span> | |||
<span className="truncate text-sm"> | |||
{title || (course.code[0] == '0' ? '' : <Skeleton />)} | |||
{title || (course.code[0] == '0' || course.code.includes("Elective") ? '' : <Skeleton />)} |
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.
Could you write a quick comment explaining the fix?
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.
Right now, the skeleton for the course title appears based on whether or not 'title' is defined. Problem is that on a degree template, some "courses" don't have titles (placeholders like "060 Course" or "CS Guided Elective") and the skeleton on those is always there. So right now I'm just doing a check on both the existence of a title and checking if the course code isn't one of the placeholders.
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.
It may make sense for this to be included as a comment in the code.
The skeleton lasts forever on template courses like 'CS Guided Elective Course', this fixes that