komap_backup/front/components/HomeHeader.tsx

19 lines
418 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { HomeRefContext } from "context/ref";
import React, { useContext } from "react";
import styles from "styles/layout.module.css";
const HomeHeader: React.FC = () => {
const ref = useContext(HomeRefContext);
const scrollToRef = () => ref?.current?.scrollIntoView();
return (
<a onClick={scrollToRef} className={styles.link}>
Регистрация
</a>
);
};
export default HomeHeader;