Skip to content

Commit

Permalink
chore: Switch from minutes prop to duration
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Jun 22, 2020
1 parent 2b923e6 commit 048aa87
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/components/GuideTile.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import PropTypes from 'prop-types';
import React from 'react';
import FeatherIcon from './FeatherIcon';
import NewRelicIcon from '../components/NewRelicIcon';
import NewRelicIcon from './NewRelicIcon';
import cx from 'classnames';
import { navigate } from 'gatsby';
import styles from './GuideTile.module.scss';

const GuideTile = ({ icon, minutes, title, description, path, className }) => (
const GuideTile = ({ icon, duration, title, description, path, className }) => (
<div className={cx(styles.tile, className, { [styles.tileWithIcon]: icon })}>
{icon && (
<div className={styles.iconContainer}>
Expand All @@ -16,7 +16,7 @@ const GuideTile = ({ icon, minutes, title, description, path, className }) => (

<div className={styles.timeEstimate}>
<FeatherIcon className={styles.timeIcon} name="clock" />
{minutes} minutes
{duration}
</div>
<h2 className={styles.title}>{title}</h2>
<p className={styles.description}>{description}</p>
Expand All @@ -31,7 +31,7 @@ const GuideTile = ({ icon, minutes, title, description, path, className }) => (
);

GuideTile.propTypes = {
minutes: PropTypes.number.isRequired,
duration: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
description: PropTypes.string.isRequired,
path: PropTypes.string.isRequired,
Expand Down
8 changes: 4 additions & 4 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ import styles from './index.module.scss';

const getStartedGuides = [
{
minutes: 5,
duration: '5 min',
title: 'Create custom events',
description:
'Define, visualize, and get alerts on the data you want using custom events',
path: '/collect-data/custom-events',
icon: 'collectData',
},
{
minutes: 7,
duration: '7 min',
title: 'Add tags to apps',
description: `Add tags to applications you instrument for easier filtering and organization`,
path: '/automate-workflows/add-tags-to-apps',
icon: 'automation',
},
{
minutes: 12,
duration: '12 min',
title: 'Build a Hello, World! app',
description: `Build a Hello, World! app and publish it to your local New Relic One Catalog`,
path: '/build-apps/build-hello-world-app',
Expand Down Expand Up @@ -146,7 +146,7 @@ const IndexPage = ({ data, pageContext }) => {
{nodes.map(({ frontmatter }, index) => (
<GuideTile
key={index}
minutes={frontmatter.duration}
duration={frontmatter.duration}
title={frontmatter.callout?.title || frontmatter.title}
description={
frontmatter.callout?.description || frontmatter.description
Expand Down

0 comments on commit 048aa87

Please sign in to comment.