mirror of
https://github.com/bendtherules/UiQuestions.git
synced 2026-08-18 13:52:50 +00:00
18 lines
354 B
React
18 lines
354 B
React
import React from "react";
|
|
|
|
const InternalLink = ({ hash, title }) => {
|
|
const handleLink = (event) => {
|
|
//manually change hash to trigger hashChange event.
|
|
window.location.hash = "#";
|
|
window.location.hash = hash;
|
|
};
|
|
|
|
return (
|
|
<a onClick={handleLink} className="navlink">
|
|
{title}
|
|
</a>
|
|
);
|
|
};
|
|
|
|
export default InternalLink;
|