apply-with-linkedin-react
Version:
React Component for Apply With LinkedIn
1 lines • 1.82 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define("ApplyWithLinkedIn",["React"],t):"object"==typeof exports?exports.ApplyWithLinkedIn=t(require("react")):e.ApplyWithLinkedIn=t(e.React)}(self,(e=>(()=>{"use strict";var t={639:t=>{t.exports=e}},n={};function o(e){var i=n[e];if(void 0!==i)return i.exports;var r=n[e]={exports:{}};return t[e](r,r.exports,o),r.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{o.r(i),o.d(i,{ApplyWithLinkedIn:()=>n});var e=o(639),t=o.n(e);const n=function(n){var o=n.apiKey,i=n.organizationId,r=n.jobCode,a=n.callbackMethod,d=n.mode;return(0,e.useEffect)((function(){var e=document.createElement("script");e.type="text/javascript",e.src="https://platform.linkedin.com/xdoor/scripts/in.js",e.async=!0,e.innerHTML="\n api_key: ".concat(o,"\n extensions:AwliWidget@https://www.linkedin.com/talentwidgets/extensions/apply-with-linkedin-widget-v3\n "),document.getElementsByTagName("body")[0].appendChild(e),window.handleApplyWithLinkedInResponse=function(e){console.log("Apply With LinkedIn profile data:",e),a&&a(e)}}),[o,i,r,a,d]),t().createElement("div",{id:"linkedin-apply-with-linkedin-widget"},t().createElement("script",{type:"IN/AwliWidget","data-mode":d,"data-integration-context":"urn:li:organization:".concat(i),"data-company-job-code":r,"data-callback-method":"handleApplyWithLinkedInResponse"}))}})(),i})()));