colouring-montreal/app/src/frontend/building/data-containers/like.tsx

24 lines
626 B
TypeScript
Raw Normal View History

2019-08-23 09:09:23 -04:00
import React, { Fragment } from 'react';
2019-08-14 17:46:35 -04:00
import LikeDataEntry from '../data-components/like-data-entry';
2019-11-07 02:39:26 -05:00
import withCopyEdit from '../data-container';
import { CategoryViewProps } from './category-view-props';
/**
* Like view/edit section
*/
const LikeView: React.FunctionComponent<CategoryViewProps> = (props) => (
2019-08-23 09:09:23 -04:00
<Fragment>
2019-08-14 17:46:35 -04:00
<LikeDataEntry
userLike={props.building_like}
totalLikes={props.building.likes_total}
mode={props.mode}
onLike={props.onLike}
2019-08-14 17:46:35 -04:00
/>
2019-08-23 09:09:23 -04:00
</Fragment>
)
const LikeContainer = withCopyEdit(LikeView);
export default LikeContainer;