department-of-veterans-affairs/vets-website

View on GitHub
src/applications/mhv-secure-messaging/components/ReplyHeader.jsx

Summary

Maintainability
A
0 mins
Test Coverage
import { focusElement } from '@department-of-veterans-affairs/platform-utilities/ui';
import React, { useEffect, useRef } from 'react';
import EmergencyNote from './EmergencyNote';

const ReplyHeader = () => {
  const header = useRef();
  useEffect(
    () => {
      focusElement(header.current);
    },
    [header],
  );

  return (
    <header>
      <h1 ref={header}>Reply</h1>
      <EmergencyNote />
    </header>
  );
};

export default ReplyHeader;