From 7f5b17162587953307c71da1b137e5f416de11bb Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 26 Jul 2019 13:44:34 +0300 Subject: more jsdoc --- vnext/src/ui/Post.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'vnext/src/ui/Post.js') diff --git a/vnext/src/ui/Post.js b/vnext/src/ui/Post.js index 99189632..35704f11 100644 --- a/vnext/src/ui/Post.js +++ b/vnext/src/ui/Post.js @@ -7,6 +7,9 @@ import MessageInput from './MessageInput'; import { post, update } from '../api'; +/** + * @param {{location: import('history').Location, visitor: import('../api').User, history: import('history').History}} props + */ export default function Post({ location, visitor, history }) { let draftMessage = (location.state || {}).draft || {}; let [draft, setDraft] = useState(draftMessage.body); @@ -46,10 +49,4 @@ export default function Post({ location, visitor, history }) { ); } -/* -Post.propTypes = { - location: ReactRouterPropTypes.location, - history: ReactRouterPropTypes.history.isRequired, - visitor: UserType -}; -*/ \ No newline at end of file + -- cgit v1.2.3