diff --git a/components/Link.jsx b/components/Link.jsx index 94c357f..9b504a2 100644 --- a/components/Link.jsx +++ b/components/Link.jsx @@ -1,15 +1,17 @@ -import React from "react" +import React from "react"; -const Link = ({hash,title}) =>{ +const Link = ({ hash, title }) => { + const handleLink = (event) => { + //manually change hash to trigger hashChange event. + window.location.hash = "#"; + window.location.hash = hash; + }; - const handleLink=(event)=>{ - //manually change hash to trigger hashChange event. - window.location.hash = "#"; - window.location.hash = hash; - } - - - return {title} -} + return ( + + {title} + + ); +}; -export default Link \ No newline at end of file +export default Link;