mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
19 lines
492 B
JavaScript
19 lines
492 B
JavaScript
import React from 'react'
|
|
import { connect } from 'umi'
|
|
import { PostsFeed } from 'components'
|
|
|
|
@connect(({ app }) => ({ app }))
|
|
export default class Post extends React.Component{
|
|
state = {
|
|
postID: null
|
|
}
|
|
componentDidMount(){
|
|
this.setState({ postID: new URLSearchParams(location.search).get('key') })
|
|
}
|
|
render(){
|
|
if (!this.state.postID) {
|
|
return null
|
|
}
|
|
return <PostsFeed from="post" fromID={this.state.postID} />
|
|
}
|
|
} |