Skip to content

Commit

Permalink
Merge pull request #16950 from newrelic/nb-migration-dev-NR-258525
Browse files Browse the repository at this point in the history
feat(Migration developer): Starting the migration of the developer site
  • Loading branch information
nbaenam committed Apr 29, 2024
2 parents 932d349 + 9f64adc commit d54018a
Show file tree
Hide file tree
Showing 21 changed files with 4,703 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/components/Navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { css } from '@emotion/react';
import { NavItem } from '@newrelic/gatsby-theme-newrelic';
import { Flipped, Flipper } from 'react-flip-toolkit';

const slugify = require('../../scripts/utils/slugify');

const Navigation = ({ nav, className }) => {
const subNav = nav.url === '/docs/style-guide';
const [flipKey, setFlipKey] = useState();
Expand Down Expand Up @@ -86,8 +88,8 @@ const Navigation = ({ nav, className }) => {
const addFlipIds = (pages, parentKey = []) =>
pages?.map((page) => ({
...page,
flipId: [...parentKey, page.title],
pages: addFlipIds(page.pages, [...parentKey, page.title]),
flipId: [...parentKey, slugify(page.title)],
pages: addFlipIds(page.pages, [...parentKey, slugify(page.title)]),
}));

export default Navigation;

0 comments on commit d54018a

Please sign in to comment.