Link - reformat

This commit is contained in:
2020-10-26 17:23:40 +05:30
parent 5a8cbef517
commit 4117131c12
+9 -7
View File
@@ -1,15 +1,17 @@
import React from "react" import React from "react";
const Link = ({ hash, title }) => { const Link = ({ hash, title }) => {
const handleLink = (event) => { const handleLink = (event) => {
//manually change hash to trigger hashChange event. //manually change hash to trigger hashChange event.
window.location.hash = "#"; window.location.hash = "#";
window.location.hash = hash; window.location.hash = hash;
} };
return (
<a onClick={handleLink} className="navlink">
{title}
</a>
);
};
return <a onClick={handleLink} className="navlink">{title}</a> export default Link;
}
export default Link