Rename Link to InternalLink and change usage

This commit is contained in:
2020-10-26 17:25:59 +05:30
parent 4117131c12
commit c6ad5ff8e3
2 changed files with 4 additions and 4 deletions
+17
View File
@@ -0,0 +1,17 @@
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;