From 4117131c12f2b68bbf954a58feb784b067ebc143 Mon Sep 17 00:00:00 2001 From: bendtherules Date: Mon, 26 Oct 2020 17:23:40 +0530 Subject: [PATCH] Link - reformat --- components/Link.jsx | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) 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;