@@ -152,7 +152,15 @@ const SignupPage = () => {
|
||||
}
|
||||
}
|
||||
|
||||
async function saveUserData(authId, dataValues, customerId, subscriptionId) {
|
||||
async function saveUserData(
|
||||
authId,
|
||||
dataValues,
|
||||
customerId,
|
||||
subscriptionId,
|
||||
subscriptionCreated,
|
||||
subscriptionPeriodStart,
|
||||
subscriptionPeriodEnd
|
||||
) {
|
||||
const appUserId = uuidv4();
|
||||
const firmId = uuidv4();
|
||||
const fbAuthUid = authId;
|
||||
@@ -205,6 +213,9 @@ const SignupPage = () => {
|
||||
customerId: customerId,
|
||||
subscriptionId: subscriptionId,
|
||||
subscriptionPlan: plan,
|
||||
subscriptionCreated: subscriptionCreated,
|
||||
subscriptionPeriodStart: subscriptionPeriodStart,
|
||||
subscriptionPeriodEnd: subscriptionPeriodEnd,
|
||||
};
|
||||
|
||||
try {
|
||||
@@ -341,6 +352,9 @@ const SignupPage = () => {
|
||||
);
|
||||
|
||||
const customerId = data.data.customerId;
|
||||
const subscriptionCreated = data.data.subscriptionCreated;
|
||||
const subscriptionPeriodStart = data.data.subscriptionPeriodStart;
|
||||
const subscriptionPeriodEnd = data.data.subscriptionPeriodEnd;
|
||||
const subscriptionId = data.data.subscriptionId;
|
||||
|
||||
if (data === undefined) {
|
||||
@@ -357,11 +371,20 @@ const SignupPage = () => {
|
||||
const user = userCredential.user;
|
||||
dataValues = { ...dataValues, ...data };
|
||||
console.log(
|
||||
"customerId, subscriptionId in handleSignup right before saveUserData",
|
||||
"customerId, subscriptionId subscriptionCreated, in handleSignup right before saveUserData",
|
||||
customerId,
|
||||
subscriptionId,
|
||||
subscriptionCreated
|
||||
);
|
||||
await saveUserData(
|
||||
user.uid,
|
||||
dataValues,
|
||||
customerId,
|
||||
subscriptionCreated,
|
||||
subscriptionPeriodStart,
|
||||
subscriptionPeriodEnd,
|
||||
subscriptionId
|
||||
);
|
||||
await saveUserData(user.uid, dataValues, customerId, subscriptionId);
|
||||
navigate("/dashboard");
|
||||
}
|
||||
} catch (error) {
|
||||
@@ -387,9 +410,13 @@ const SignupPage = () => {
|
||||
<div className="signup-sub-container">
|
||||
<div className="signup-header">
|
||||
<h1 className="signup-header-text">Create A Novodraft Account</h1>
|
||||
<h5 className="signup-header-text trial">
|
||||
Start a free trial - save hours and draft better discovery
|
||||
</h5>
|
||||
{!isUpgrade ? (
|
||||
<h5 className="signup-header-text trial">
|
||||
Start a free trial - save hours and draft better discovery
|
||||
</h5>
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
</div>
|
||||
<Form className="signup-form">
|
||||
{splitEvery(
|
||||
|
||||
Reference in New Issue
Block a user