mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 02:24:16 +00:00
added component
This commit is contained in:
parent
17ff2b986d
commit
9c057d6017
15
packages/app/src/components/RouterLink/index.jsx
Normal file
15
packages/app/src/components/RouterLink/index.jsx
Normal file
@ -0,0 +1,15 @@
|
||||
import React from "react"
|
||||
|
||||
const RouterLink = ({ to, children, onClick }) => {
|
||||
const handleClick = () => {
|
||||
if (typeof onClick === "function") {
|
||||
onClick()
|
||||
}
|
||||
|
||||
app.location.push(to)
|
||||
}
|
||||
|
||||
return <a onClick={handleClick}>{children}</a>
|
||||
}
|
||||
|
||||
export default RouterLink
|
2
vessel
2
vessel
@ -1 +1 @@
|
||||
Subproject commit fb190878b21e9e298a1185b9b42f9cbc99fd2277
|
||||
Subproject commit bdbd92a73cd8305e36fcf0b8d7ea0ceba8a1ffcc
|
Loading…
x
Reference in New Issue
Block a user