mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
28 lines
508 B
JavaScript
28 lines
508 B
JavaScript
import React from "react"
|
|
import { Tag } from "antd"
|
|
|
|
import "./index.less"
|
|
|
|
const PostLink = (props) => {
|
|
if (!props.post_id) {
|
|
return null
|
|
}
|
|
|
|
return <Tag
|
|
className="post-link"
|
|
color="geekblue"
|
|
onClick={() => {
|
|
if (props.onClick) {
|
|
return props.onClick()
|
|
}
|
|
|
|
app.navigation.goToPost(props.post_id)
|
|
}}
|
|
>
|
|
<span>
|
|
#{props.post_id}
|
|
</span>
|
|
</Tag>
|
|
}
|
|
|
|
export default PostLink |