From ed13cd9514afb3818368d77ea6d709ceb33186a0 Mon Sep 17 00:00:00 2001 From: Murali Suresh Date: Tue, 21 Feb 2017 19:27:44 +0900 Subject: [PATCH] Share card for all devices in Event page --- reactJS/app/components/EventPageComponent.js | 44 +++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/reactJS/app/components/EventPageComponent.js b/reactJS/app/components/EventPageComponent.js index c4b354e5..d6e17a44 100755 --- a/reactJS/app/components/EventPageComponent.js +++ b/reactJS/app/components/EventPageComponent.js @@ -13,6 +13,8 @@ import {Table, Column, Cell} from 'fixed-data-table-2'; import MediaQuery from 'react-responsive'; import {Card, CardActions, CardHeader, CardText} from 'material-ui/Card'; import Dialog from 'material-ui/Dialog'; +import CopyToClipboard from 'react-copy-to-clipboard'; +import IconButton from 'material-ui/IconButton'; import { fetchEvent, storePersonalizedDateSelection, storeAttendeeName, storeAttendeeNameErrorLabel, registerAttendee, updateNotificationFlag, emptyPersonalizedDateSelection, @@ -1111,6 +1113,43 @@ class EventPageComponent extends Component { } } + renderShareCard() { + let eventId = this.props.params.eventId; + let eventShareURL = window.location.origin + '/event/' + encodeURI(eventId); + return ( +
+
+ + +
+ + Copy link to share +
+
+
+
+
+ + + content_copy + + +
+ +
+
+
+
+
+ ); + } + // Render the whole EventPage App. Starting point of this component. render() { @@ -1141,6 +1180,8 @@ class EventPageComponent extends Component {

{this.renderLocation()}

+ {this.renderShareCard()} +

@@ -1198,7 +1239,8 @@ class EventPageComponent extends Component { {this.renderLocation()} - +

+ {this.renderShareCard()}
{this.toggleMobileCastAttendance()}