more
This commit is contained in:
@@ -121,8 +121,7 @@ const HomePage = () => {
|
|||||||
AI-Powered Legal Drafting Technology{" "}
|
AI-Powered Legal Drafting Technology{" "}
|
||||||
</h2>
|
</h2>
|
||||||
<p className="section-three-subhead">
|
<p className="section-three-subhead">
|
||||||
Created by litigators with law-centric AI at its core to give you
|
Created by litigators to give you an edge.
|
||||||
an edge.
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="card-section-container">
|
<div className="card-section-container">
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ const SignupPage = () => {
|
|||||||
const [showSelectPlan, setShowSelectPlan] = useState(false);
|
const [showSelectPlan, setShowSelectPlan] = useState(false);
|
||||||
const [activeRadioOption, setActiveRadioOption] = useState("partner");
|
const [activeRadioOption, setActiveRadioOption] = useState("partner");
|
||||||
const [selectedPlan, setSelectedPlan] = useState([signupRadioFields[1]]);
|
const [selectedPlan, setSelectedPlan] = useState([signupRadioFields[1]]);
|
||||||
const [isAnnual, setIsAnnual] = useState(true);
|
const [isAnnual, setIsAnnual] = useState(1);
|
||||||
const stripe = new Stripe(stripeApiKey);
|
const stripe = new Stripe(stripeApiKey);
|
||||||
const apiUrl =
|
const apiUrl =
|
||||||
process.env.NODE_ENV === "development"
|
process.env.NODE_ENV === "development"
|
||||||
@@ -213,19 +213,23 @@ const SignupPage = () => {
|
|||||||
if (isBusy) {
|
if (isBusy) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
const dataValues = validateUserData();
|
const dataValues = validateUserData();
|
||||||
if (dataValues === null) {
|
if (dataValues === null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
saveLeadData(dataValues);
|
saveLeadData(dataValues);
|
||||||
|
*/
|
||||||
setShowSelectPlan(!showSelectPlan);
|
setShowSelectPlan(!showSelectPlan);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleToggle = () => {
|
const handleToggle = (e) => {
|
||||||
setIsAnnual(!isAnnual);
|
if (isAnnual === e) {
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
setIsAnnual(e);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleAddAccounts = () => {
|
const handleAddAccounts = () => {
|
||||||
@@ -236,7 +240,7 @@ const SignupPage = () => {
|
|||||||
setShowAddAccount(!showAddAccount);
|
setShowAddAccount(!showAddAccount);
|
||||||
};
|
};
|
||||||
|
|
||||||
// ******************** STRIPE PAY API CALL ******************** //
|
// ******************** STRIPE PAYMENT API CALL ******************** //
|
||||||
async function handleStripeAuthorization(
|
async function handleStripeAuthorization(
|
||||||
paymentDataValues,
|
paymentDataValues,
|
||||||
customerDataValues
|
customerDataValues
|
||||||
@@ -262,6 +266,7 @@ const SignupPage = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const type = selectedPlan[0].value ? selectedPlan[0].value : null;
|
const type = selectedPlan[0].value ? selectedPlan[0].value : null;
|
||||||
|
const tempAnnual = isAnnual === 1 ? true : false;
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`${apiUrl}/create-subscription`, {
|
const response = await fetch(`${apiUrl}/create-subscription`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
@@ -271,7 +276,7 @@ const SignupPage = () => {
|
|||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
planType: type,
|
planType: type,
|
||||||
additionalAccounts: additionalAccounts,
|
additionalAccounts: additionalAccounts,
|
||||||
isAnnual: isAnnual,
|
isAnnual: tempAnnual,
|
||||||
customerData: {
|
customerData: {
|
||||||
email: customerDataValues.email,
|
email: customerDataValues.email,
|
||||||
name: `${customerDataValues.firstName} ${customerDataValues.lastName}`,
|
name: `${customerDataValues.firstName} ${customerDataValues.lastName}`,
|
||||||
@@ -291,18 +296,10 @@ const SignupPage = () => {
|
|||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
error = true;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (error) {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
return {
|
// ******************** END STRIPE PAYMENT API CALL ******************** //
|
||||||
subscriptionId,
|
|
||||||
customerId,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
// ******************** END STRIPE PAY API CALL ******************** //
|
|
||||||
|
|
||||||
const handleSignup = async (e) => {
|
const handleSignup = async (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -598,7 +595,7 @@ const SignupPage = () => {
|
|||||||
notice={notice}
|
notice={notice}
|
||||||
setNotice={setNotice}
|
setNotice={setNotice}
|
||||||
selectedPlan={selectedPlan}
|
selectedPlan={selectedPlan}
|
||||||
isAnnual={isAnnual}
|
isAnnual={isAnnual === 1 ? true : false}
|
||||||
numberOfAccountsToAdd={numberOfAccountsToAdd}
|
numberOfAccountsToAdd={numberOfAccountsToAdd}
|
||||||
fieldsChunkSize={2}
|
fieldsChunkSize={2}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -14,9 +14,10 @@ const Radio = (props) => {
|
|||||||
details,
|
details,
|
||||||
isAnnual,
|
isAnnual,
|
||||||
} = props;
|
} = props;
|
||||||
|
console.log("isAnnual in radio", isAnnual);
|
||||||
const classCheckbox = "checkbox";
|
const classCheckbox = "checkbox";
|
||||||
const classOption = "option";
|
const classOption = "option";
|
||||||
const index = isAnnual ? Number("1") : Number("0");
|
const index = isAnnual === 1 ? Number("1") : Number("0");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="radio-container">
|
<div className="radio-container">
|
||||||
|
|||||||
@@ -7,12 +7,13 @@ const Toggle = (props) => {
|
|||||||
<>
|
<>
|
||||||
<ToggleButtonGroup type="radio" name="options" defaultValue={1}>
|
<ToggleButtonGroup type="radio" name="options" defaultValue={1}>
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
onClick={onClick}
|
onClick={(e) => onClick(1)}
|
||||||
id="tbg-radio-1"
|
id="tbg-radio-1"
|
||||||
value={1}
|
value={1}
|
||||||
></ToggleButton>
|
></ToggleButton>
|
||||||
|
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
onClick={onClick}
|
onClick={(e) => onClick(2)}
|
||||||
id="tbg-radio-2"
|
id="tbg-radio-2"
|
||||||
value={2}
|
value={2}
|
||||||
></ToggleButton>
|
></ToggleButton>
|
||||||
|
|||||||
Reference in New Issue
Block a user