Skip to content

Commit

Permalink
Merge pull request #1830 from newrelic/liz/trailing-slash
Browse files Browse the repository at this point in the history
Use Link component for pack tiles
  • Loading branch information
aswanson-nr authored Oct 28, 2021
2 parents edd5f28 + 62e20a2 commit f71956f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/components/PackTile.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import React from 'react';
import PropTypes from 'prop-types';
import { navigate } from 'gatsby';

import { css } from '@emotion/react';
import { Surface, Icon, useTessen, Tag } from '@newrelic/gatsby-theme-newrelic';
import {
Surface,
Icon,
useTessen,
Tag,
Link,
} from '@newrelic/gatsby-theme-newrelic';
import { SHIELD_LEVELS, RESERVED_QUICKSTART_IDS } from '../data/constants';
import PackImg from './PackImg';

Expand Down Expand Up @@ -45,12 +50,13 @@ const PackTile = ({
publicCatalogView: view,
quickstartName: name,
});
navigate(fields.slug);
}
};

return (
<Surface
as={Link}
to={fields?.slug || '/'}
key={id}
base={Surface.BASE.PRIMARY}
className={className}
Expand Down

0 comments on commit f71956f

Please sign in to comment.