diff --git a/src/components/Assets.jsx b/src/components/Assets.jsx index 5566866..0042359 100644 --- a/src/components/Assets.jsx +++ b/src/components/Assets.jsx @@ -207,19 +207,11 @@ const Assets = ({ onProBtnClick, onLoginBtnClick }) => {

Assets feature is available in PRO plan.

diff --git a/src/components/Pro.jsx b/src/components/Pro.jsx index 84efd21..8ad9b68 100644 --- a/src/components/Pro.jsx +++ b/src/components/Pro.jsx @@ -11,7 +11,8 @@ import { showConfetti } from '../utils'; const checkoutIds = { monthly: '1601bc00-9623-435b-b1de-2a70a2445c13', - annual: 'aae95d78-05c8-46f5-b11e-2d40ddd211d3' + annual: 'aae95d78-05c8-46f5-b11e-2d40ddd211d3', + generic: 'f8c64e50-7734-438b-a122-3510156f14ed' }; export function Pro({ user }) { const hasCheckoutLoaded = useCheckout(); @@ -38,7 +39,7 @@ export function Pro({ user }) { }, [hasCheckoutLoaded]); return ( - + {/* - + */} - Go + Go PRO } features={[ diff --git a/src/components/Profile.jsx b/src/components/Profile.jsx index 11678d3..be12699 100644 --- a/src/components/Profile.jsx +++ b/src/components/Profile.jsx @@ -53,7 +53,11 @@ export function Profile({ user, logoutBtnHandler }) { setIsFetchingSubscription(false); const creationEvent = events - .filter(event => event.type === 'subscription_created') + .filter( + event => + event.type === 'subscription_created' || + event.type === 'order_created' + ) .sort((a, b) => b.timestamp.seconds - a.timestamp.seconds)[0]; if (creationEvent) { console.log(creationEvent); @@ -69,7 +73,7 @@ export function Profile({ user, logoutBtnHandler }) { {window.user?.isPro && ( {isFetchingSubscription ? ( - Loading subscription details... + Loading billing details... ) : null} {currentSubscription ? ( @@ -77,31 +81,39 @@ export function Profile({ user, logoutBtnHandler }) { Plan: {' '} - {currentSubscription.attributes.product_name} + Web Maker PRO ( + {currentSubscription.attributes.first_order_item.variant_name} + ) Subscription Status:{' '} - {currentSubscription.attributes.status} + {currentSubscription.attributes.status === 'paid' + ? 'PRO for life ❤️' + : currentSubscription.attributes.status} Renews on:{' '} - {getHumanReadableDate( - currentSubscription.attributes.renews_at - )} + {currentSubscription.attributes.status === 'paid' + ? 'Never ever' + : getHumanReadableDate( + currentSubscription.attributes.renews_at + )} - - Cancel subscription - + {currentSubscription.attributes.status === 'paid' ? null : ( + + Cancel subscription + + )} {/* svg { margin-right: 12px; } +@property --angle { + syntax: ''; + initial-value: 0deg; + inherits: false; +} +.btn--pro { + background: linear-gradient( + var(--angle), + var(--color-pro-1), + var(--color-pro-2) + ); + color: #222; + border: 0; + font-weight: 700; + animation: gradient_move 3s ease infinite; +} +@keyframes gradient_move { + from { + --angle: 0deg; + } + to { + --angle: 360deg; + } +} + .btn-loader { display: none; } @@ -2228,7 +2253,7 @@ while the theme CSS file is loading */ padding: 0.1rem 0.3rem; background: crimson; border-radius: 1rem; - font-size: 0.7em; + font-size: 0.75em; color: #222; font-weight: 800; line-height: 1;