mirror of
https://github.com/bendtherules/UiQuestions.git
synced 2026-08-20 00:31:00 +00:00
Added DocWrapper and Link component to address link issues
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import React from "react"
|
||||
|
||||
const Link = ({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 Link
|
||||
Reference in New Issue
Block a user