Skip to content

Commit

Permalink
fix: change for name of variable
Browse files Browse the repository at this point in the history
  • Loading branch information
kisielewskik committed Feb 3, 2022
1 parent 5e89f3b commit 5ded8f4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/components/GuideTile/GuideTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const GuideTile = ({
description,
className,
to,
procIdxisNotInteger,
procIdxIsInteger,
}) => (
<Surface
as={Link}
Expand All @@ -20,8 +20,8 @@ const GuideTile = ({
css={css`
display: grid;
grid-template-rows: auto 1fr auto;
width: ${procIdxisNotInteger ? '100%' : '90%'};
margin-left: ${procIdxisNotInteger ? '0' : '10%'};
width: ${procIdxIsInteger ? '100%' : '90%'};
margin-left: ${procIdxIsInteger ? '0' : '10%'};
border-radius: 0.25rem;
position: relative;
padding: 1rem;
Expand All @@ -31,7 +31,7 @@ const GuideTile = ({
<h3
css={css`
font-size: 1rem;
margin-bottom: ${procIdxisNotInteger ? '1rem' : '0.1rem'};
margin-bottom: ${procIdxIsInteger ? '1rem' : '0.1rem'};
`}
>
{title}
Expand All @@ -43,7 +43,7 @@ const GuideTile = ({
flex: 1;
text-align: left;
padding: 0;
margin-bottom: ${procIdxisNotInteger ? '0.8rem' : '0.1rem'};
margin-bottom: ${procIdxIsInteger ? '0.8rem' : '0.1rem'};
`}
>
{description}
Expand Down Expand Up @@ -74,7 +74,7 @@ GuideTile.propTypes = {
description: PropTypes.string.isRequired,
className: PropTypes.string,
to: PropTypes.string.isRequired,
procIdxisNotInteger: PropTypes.bool,
procIdxIsInteger: PropTypes.bool,
};

export default GuideTile;
6 changes: 3 additions & 3 deletions src/templates/LabOverviewTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@ const LabOverviewTemplate = ({ data, location }) => {
{guides?.nodes
.sort(sortProcedures)
.map(({ fields, frontmatter }, index) => {
const procIdxisNotInteger = Number.isInteger(
const procIdxIsInteger = Number.isInteger(
frontmatter.procIdx
);
return (
<GuideTile
procIdxisNotInteger={procIdxisNotInteger}
procIdxIsInteger={procIdxIsInteger}
className={labOverviewStyles.labGuideCard}
to={fields.slug}
key={index}
duration={frontmatter.duration}
title={`${
procIdxisNotInteger ? `${frontmatter.procIdx}.` : ''
procIdxIsInteger ? `${frontmatter.procIdx}.` : ''
} ${
frontmatter.tileShorthand?.title || frontmatter.title
}`}
Expand Down

0 comments on commit 5ded8f4

Please sign in to comment.