@sunsama/splash
Advanced tools
Comparing version 0.1.10 to 0.1.11
@@ -1,1 +0,9 @@ | ||
export {}; | ||
declare type AddToWaitlistResponse = { | ||
waitlistId: string; | ||
status: string; | ||
inviteUrl: string; | ||
}; | ||
declare const SunsamaSplash: { | ||
splash: () => void; | ||
requestAccess: () => Promise<void>; | ||
}; |
@@ -0,1 +1,3 @@ | ||
"use strict"; | ||
// import ky from 'ky'; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -10,13 +12,2 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
import ky from 'ky'; | ||
const meteorCall = (methodName, params) => { | ||
const baseUrl = 'localhost:3000'; | ||
return ky.post(`${baseUrl}/api/v0/${methodName}`, { | ||
json: { | ||
name: methodName, | ||
params, | ||
}, | ||
}) | ||
.json(); | ||
}; | ||
const SunsamaSplash = { | ||
@@ -30,13 +21,19 @@ splash: () => console.log('splash'), | ||
// Request Access, get Waitlist Id, then return. | ||
const response = yield meteorCall('addToWaitlist', { | ||
name, | ||
email, | ||
}); | ||
const { waitlistId, status, inviteUrl } = response; | ||
console.log({ waitlistId, status, inviteUrl }); | ||
if (waitlistId) { | ||
window.open(`https://sunsama.com/start/waitlist?waitlistId=${waitlistId}`, '_self'); | ||
} | ||
// const response = <AddToWaitlistResponse> await meteorCall('addToWaitlist', { | ||
// name, | ||
// email, | ||
// // splashRoute, | ||
// // deviceId: window.amplitudeDeviceId, | ||
// // referrerGroupEdgeId: referrerInfo && referrerInfo.id, | ||
// // tracking: { | ||
// // facebook: getFacebookCookies(), | ||
// // }, | ||
// }); | ||
// const { waitlistId, status, inviteUrl } = response; | ||
// console.log({ waitlistId, status, inviteUrl }); | ||
// if (waitlistId) { | ||
window.open(`https://sunsama.com/start/waitlist?waitlistId=${''}`, '_self'); | ||
// } | ||
}) | ||
}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"version": "0.1.10", | ||
"version": "0.1.11", | ||
"license": "MIT", | ||
@@ -4,0 +4,0 @@ "main": "dist/index.js", |
@@ -1,13 +0,13 @@ | ||
import ky from 'ky'; | ||
// import ky from 'ky'; | ||
const meteorCall = (methodName: string, params: object) => { | ||
const baseUrl = 'localhost:3000'; | ||
return ky.post(`${baseUrl}/api/v0/${methodName}`, { | ||
json: { | ||
name: methodName, | ||
params, | ||
}, | ||
}) | ||
.json(); | ||
} | ||
// const meteorCall = (methodName: string, params: object) => { | ||
// const baseUrl = 'localhost:3000'; | ||
// return ky.post(`${baseUrl}/api/v0/${methodName}`, { | ||
// json: { | ||
// name: methodName, | ||
// params, | ||
// }, | ||
// }) | ||
// .json(); | ||
// } | ||
@@ -28,20 +28,20 @@ type AddToWaitlistResponse = { | ||
const response = <AddToWaitlistResponse> await meteorCall('addToWaitlist', { | ||
name, | ||
email, | ||
// splashRoute, | ||
// deviceId: window.amplitudeDeviceId, | ||
// referrerGroupEdgeId: referrerInfo && referrerInfo.id, | ||
// tracking: { | ||
// facebook: getFacebookCookies(), | ||
// }, | ||
}); | ||
// const response = <AddToWaitlistResponse> await meteorCall('addToWaitlist', { | ||
// name, | ||
// email, | ||
// // splashRoute, | ||
// // deviceId: window.amplitudeDeviceId, | ||
// // referrerGroupEdgeId: referrerInfo && referrerInfo.id, | ||
// // tracking: { | ||
// // facebook: getFacebookCookies(), | ||
// // }, | ||
// }); | ||
const { waitlistId, status, inviteUrl } = response; | ||
console.log({ waitlistId, status, inviteUrl }); | ||
if (waitlistId) { | ||
window.open(`https://sunsama.com/start/waitlist?waitlistId=${waitlistId}`, '_self'); | ||
} | ||
// const { waitlistId, status, inviteUrl } = response; | ||
// console.log({ waitlistId, status, inviteUrl }); | ||
// if (waitlistId) { | ||
window.open(`https://sunsama.com/start/waitlist?waitlistId=${''}`, '_self'); | ||
// } | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9617
84