-
Notifications
You must be signed in to change notification settings - Fork 114
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
feat: new styles for subtask in lab #2033
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,21 +47,29 @@ const LabOverviewTemplate = ({ data, location }) => { | |
<GuideListing.List className={labOverviewStyles.labGuideList}> | ||
{guides?.nodes | ||
.sort(sortProcedures) | ||
.map(({ fields, frontmatter }, index) => ( | ||
<GuideTile | ||
className={labOverviewStyles.labGuideCard} | ||
to={fields.slug} | ||
key={index} | ||
duration={frontmatter.duration} | ||
title={`${frontmatter.procIdx}. ${ | ||
frontmatter.tileShorthand?.title || frontmatter.title | ||
}`} | ||
description={ | ||
frontmatter.tileShorthand?.description || | ||
frontmatter.description | ||
} | ||
/> | ||
))} | ||
.map(({ fields, frontmatter }, index) => { | ||
const procIdxisNotInteger = Number.isInteger( | ||
frontmatter.procIdx | ||
); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as this is set up now procIdxisNotInteger will evaluate to true when a number is an integer. would you mind renaming it to procIdxIsInteger? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I changed name of variable is more logic now |
||
return ( | ||
<GuideTile | ||
procIdxisNotInteger={procIdxisNotInteger} | ||
className={labOverviewStyles.labGuideCard} | ||
to={fields.slug} | ||
key={index} | ||
duration={frontmatter.duration} | ||
title={`${ | ||
procIdxisNotInteger ? `${frontmatter.procIdx}.` : '' | ||
} ${ | ||
frontmatter.tileShorthand?.title || frontmatter.title | ||
}`} | ||
description={ | ||
frontmatter.tileShorthand?.description || | ||
frontmatter.description | ||
} | ||
/> | ||
); | ||
})} | ||
</GuideListing.List> | ||
</> | ||
)} | ||
|
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.
Attached is the screen shot for this change so it's visible, this is OK for me, so I approve this.
