department-of-veterans-affairs/vets-website

View on GitHub
src/applications/search/components/Breadcrumbs.jsx

Summary

Maintainability
A
0 mins
Test Coverage
import React, { useEffect } from 'react';
import { VaBreadcrumbs } from '@department-of-veterans-affairs/web-components/react-bindings';
import { focusElement } from 'platform/utilities/ui';

const Breadcrumbs = () => {
  useEffect(() => {
    focusElement('#search-breadcrumbs');
  }, []);

  return (
    <div className="row">
      <VaBreadcrumbs
        class="vads-u-margin-left--1p5"
        id="search-breadcrumbs"
        label="Breadcrumbs"
        breadcrumbList={[
          {
            href: '/',
            label: 'Home',
          },
          {
            href: '/search',
            label: 'Search VA.gov',
          },
        ]}
      />
    </div>
  );
};

export default Breadcrumbs;