mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-10-26 15:18:16 +03:00
feat: Add user email to StripePricingOrManageButton and UpgradeToPlusButton components (#2951)
# Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. ## Checklist before requesting a review Please delete options that are not relevant. - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented hard-to-understand areas - [ ] I have ideally added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged ## Screenshots (if appropriate):
This commit is contained in:
parent
13e9fc490b
commit
acf0e1db1a
@ -39,6 +39,7 @@ export const StripePricingOrManageButton = ({
|
||||
></QuivrButton>
|
||||
</div>
|
||||
}
|
||||
user_email={userData?.email ?? ""}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
@ -23,6 +23,7 @@ export const UpgradeToPlusButton = (): JSX.Element => {
|
||||
color="gold"
|
||||
/>
|
||||
}
|
||||
user_email={userData?.email ?? ""}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
@ -4,14 +4,16 @@ import { Modal } from "../../ui/Modal/Modal";
|
||||
|
||||
type StripePricingModalProps = {
|
||||
Trigger: JSX.Element;
|
||||
user_email: string;
|
||||
};
|
||||
|
||||
export const StripePricingModal = ({
|
||||
Trigger,
|
||||
user_email,
|
||||
}: StripePricingModalProps): JSX.Element => {
|
||||
return (
|
||||
<Modal Trigger={Trigger} CloseTrigger={<div />} unforceWhite={true}>
|
||||
<StripePricingTable />
|
||||
<StripePricingTable user_email={user_email} />
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
@ -5,7 +5,7 @@ import styles from "./PricingTable.module.scss";
|
||||
const PRICING_TABLE_ID = process.env.NEXT_PUBLIC_STRIPE_PRICING_TABLE_ID;
|
||||
const PUBLISHABLE_KEY = process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY;
|
||||
|
||||
export const StripePricingTable = (): JSX.Element => {
|
||||
export const StripePricingTable = ({ user_email }: { user_email: string }): JSX.Element => {
|
||||
return (
|
||||
<>
|
||||
<div className={styles.info_content}>
|
||||
@ -26,6 +26,7 @@ export const StripePricingTable = (): JSX.Element => {
|
||||
<stripe-pricing-table
|
||||
pricing-table-id={PRICING_TABLE_ID}
|
||||
publishable-key={PUBLISHABLE_KEY}
|
||||
customer-email={user_email}
|
||||
></stripe-pricing-table>
|
||||
</div>
|
||||
</>
|
||||
|
Loading…
Reference in New Issue
Block a user