JSFiddle - React, Tailwind, and code Playground

by harianus

HTML

input field with personal url
email share (just mailto on mobile and desktop)
facebook share
twitter share
whatsapp share (only on mobile)

<div id="mgmco-widget"></div>

JavaScript

window.mgmco = {
	project: '56d7f509b0adab130020e630', // mobiel acceptance
  email: '[email protected]'
};

(function(mgmco) {

	var MGMcoWidget = {

		// Mock the request when testing, REMOVE THIS WHEN IN PULL REQUEST
		testing: true,
    mockRequest: {
      "offer": {
        "_id": "57601c568902ae35005da416",
        "createdAt": "2016-06-14T15:01:42.298Z",
        "updatedAt": "2016-06-14T15:01:42.298Z",
        "bimes": "hozavo",
        "seller": "57601c54d3a0b01f0042d500",
        "product": "55f80bd614705b0e00eaec0d",
        "project": {
          "_id": "55f7e538539eb20e00c029c7",
          "image": "https://assets.membergetmember.co/projects/qurrent/logos/Qurrent-logo-RGB-kleur.png",
          "name": "Qurrent",
          "slug": "qurrent",
          "cname": "vriendenkorting.qurrent.nl",
          "programName": "Qurrent vriendenkorting",
          "facebookAppId": "889196634450235",
          "primaryColor": "#237dc0",
          "secondaryColor": "#4b4442",
          "createdAt": "2015-09-15T09:30:32.327Z",
          "updatedAt": "2015-09-15T09:30:32.327Z",
          "active": true,
          "signupFields": [],
          "saleFields": [],
          "defaultCommission": 0.7,
          "paysSeller": false,
          "paysBuyer": false,
          "showExitPopup": true,
          "supportEmail": "[email protected]",
          "accountManager": "565f018c5adc2b31001a6239"
        },
        "division": {
          "_id": "55c888c3e9e5e707469041d0",
          "updatedAt": "2015-08-10T11:19:31.344Z",
          "name": "Ik deel de beloning fifty-fifty",
          "buyerPercentage": 0.5,
          "sellerPercentage": 0.5,
          "createdAt": "2014-08-26T07:42:01.000Z",
          "active": true,
          "default": true
        },
        "active": true
      },
      "meta": {
        "new_user": true
      }
    },

		hosts: {
    	api: 'https://api.mgmco-acceptance.nl',
			session: 'https://session.membergetmember.co'
...