diff --git a/src/components/profile/progress/UserProgress.js b/src/components/profile/progress/UserProgress.js index 6942a16..58c42bd 100644 --- a/src/components/profile/progress/UserProgress.js +++ b/src/components/profile/progress/UserProgress.js @@ -15,7 +15,7 @@ const allTasks = [ tier: 'Pleb', courseId: null, subTasks: [ - { status: 'Create Your First GitHub Repo', completed: false }, + { status: 'Connect your GitHub account', completed: false }, ] }, { @@ -35,7 +35,7 @@ const allTasks = [ courseId: 'f73c37f4-df2e-4f7d-a838-dce568c76136', subTasks: [ { status: 'Complete the course', completed: false }, - { status: 'Select your completed project', completed: false }, + // { status: 'Select your completed project', completed: false }, ] }, { @@ -45,7 +45,7 @@ const allTasks = [ courseId: 'f6825391-831c-44da-904a-9ac3d149b7be', subTasks: [ { status: 'Complete the course', completed: false }, - { status: 'Select your completed project', completed: false }, + // { status: 'Select your completed project', completed: false }, ] }, ]; diff --git a/src/components/profile/subscription/UserSubscription.js b/src/components/profile/subscription/UserSubscription.js index 59ddf93..7442b6b 100644 --- a/src/components/profile/subscription/UserSubscription.js +++ b/src/components/profile/subscription/UserSubscription.js @@ -5,13 +5,11 @@ import { useToast } from '@/hooks/useToast'; import axios from 'axios'; import { Card } from 'primereact/card'; import useWindowWidth from '@/hooks/useWindowWidth'; -import { Menu } from "primereact/menu"; import { Message } from "primereact/message"; import { ProgressSpinner } from 'primereact/progressspinner'; import SubscriptionPaymentButtons from '@/components/bitcoinConnect/SubscriptionPaymentButton'; import Image from 'next/image'; import NostrIcon from '../../../../public/images/nostr.png'; -import { Badge } from 'primereact/badge'; import GenericButton from '@/components/buttons/GenericButton'; import CancelSubscription from '@/components/profile/subscription/CancelSubscription'; import CalendlyEmbed from '@/components/profile/subscription/CalendlyEmbed'; @@ -100,130 +98,141 @@ const UserSubscription = () => { {windowWidth < 768 && (

Subscription Management

)} -
- {subscribed && !user?.role?.nwc && ( -
- -

Thank you for your support 🎉

-

Pay-as-you-go subscription requires manual renewal on {subscribedUntil.toLocaleDateString()}

-
- )} - {subscribed && user?.role?.nwc && ( -
- -

Thank you for your support 🎉

-

Recurring subscription will AUTO renew on {subscribedUntil.toLocaleDateString()}

-
- )} - {(!subscribed && !subscriptionExpiredAt) && ( -
- -
- )} - {subscriptionExpiredAt && ( -
- -
- )} -
- {!subscribed && ( - - {isProcessing ? ( -
-
- Processing subscription... -
- ) : ( -
-
-

Unlock Premium Benefits

-

Subscribe now and elevate your development journey!

-
-
-
- - Access ALL current and future PlebDevs content -
-
- - Personal mentorship & guidance and access to exclusive 1:1 booking calendar -
-
- - Claim your own personal plebdevs.com Lightning Address -
-
- Nostr - Claim your own personal plebdevs.com Nostr NIP-05 identity -
-
- - I WILL MAKE SURE YOU WIN HARD AND LEVEL UP AS A DEV! -
-
- -
- )} -
- )} - {subscribed && ( - <> - - {isProcessing ? ( -
-
- Processing subscription... -
- ) : ( +
+ {/* Left Column - 22% */} +
+
+ {/* Subscription Status Messages */} + {subscribed && !user?.role?.nwc && (
-
- setCalendlyVisible(true)} /> - setNip05Visible(true)} /> - } onClick={() => setLightningAddressVisible(true)} /> -
+ +

Thank you for your support 🎉

+

Pay-as-you-go subscription requires manual renewal on {subscribedUntil.toLocaleDateString()}

)} - - -
- setRenewSubscriptionVisible(true)} /> - setCancelSubscriptionVisible(true)} /> + {subscribed && user?.role?.nwc && ( +
+ +

Thank you for your support 🎉

+

Recurring subscription will AUTO renew on {subscribedUntil.toLocaleDateString()}

+
+ )} + {(!subscribed && !subscriptionExpiredAt) && ( +
+ +
+ )} + {subscriptionExpiredAt && ( +
+ +
+ )} +
+
+ + {/* Right Column - 78% */} +
+ {!subscribed && ( + + {isProcessing ? ( +
+
+ Processing subscription... +
+ ) : ( +
+
+

Unlock Premium Benefits

+

Subscribe now and elevate your development journey!

+
+
+
+ + Access ALL current and future PlebDevs content +
+
+ + Personal mentorship & guidance and access to exclusive 1:1 booking calendar +
+
+ + Claim your own personal plebdevs.com Lightning Address +
+
+ Nostr + Claim your own personal plebdevs.com Nostr NIP-05 identity +
+
+ + I WILL MAKE SURE YOU WIN HARD AND LEVEL UP AS A DEV! +
+
+ +
+ )} +
+ )} + + {subscribed && ( + <> + + {isProcessing ? ( +
+
+ Processing subscription... +
+ ) : ( +
+
+ setCalendlyVisible(true)} /> + setNip05Visible(true)} /> + } onClick={() => setLightningAddressVisible(true)} /> +
+
+ )} +
+ +
+ setRenewSubscriptionVisible(true)} /> + setCancelSubscriptionVisible(true)} /> +
+
+ + )} + + +
+
+

How does the subscription work?

+

Think of the subscriptions as a paetreon type model. You pay a monthly fee and in return you get access to premium features and all of the paid content. You can cancel at any time.

+
+
+

How do I Subscribe? (Pay as you go)

+

The pay as you go subscription is a one-time payment that gives you access to all of the premium features for one month. You will need to manually renew your subscription every month.

+
+
+

How do I Subscribe? (Recurring)

+

The recurring subscription option allows you to submit a Nostr Wallet Connect URI that will be used to automatically send the subscription fee every month. You can cancel at any time.

+
+
+

Can I cancel my subscription?

+

Yes, you can cancel your subscription at any time. Your access will remain active until the end of the current billing period.

+
+
+

What happens if I don't renew my subscription?

+

If you don't renew your subscription, your access to 1:1 calendar and paid content will be removed. However, you will still have access to your plebdevs Lightning Address, NIP-05, and any content that you paid for.

+
+ {/* Add more FAQ items as needed */}
- - )} - - -
-
-

How does the subscription work?

-

Think of the subscriptions as a paetreon type model. You pay a monthly fee and in return you get access to premium features and all of the paid content. You can cancel at any time.

-
-
-

How do I Subscribe? (Pay as you go)

-

The pay as you go subscription is a one-time payment that gives you access to all of the premium features for one month. You will need to manually renew your subscription every month.

-
-
-

How do I Subscribe? (Recurring)

-

The recurring subscription option allows you to submit a Nostr Wallet Connect URI that will be used to automatically send the subscription fee every month. You can cancel at any time.

-
-
-

Can I cancel my subscription?

-

Yes, you can cancel your subscription at any time. Your access will remain active until the end of the current billing period.

-
-
-

What happens if I don't renew my subscription?

-

If you don't renew your subscription, your access to 1:1 calendar and paid content will be removed. However, you will still have access to your plebdevs Lightning Address, NIP-05, and any content that you paid for.

-
- {/* Add more FAQ items as needed */}
-
+
{ + if (!accessToken) return []; + + const octokit = new ThrottledOctokit({ + auth: accessToken, + throttle: { + onRateLimit: (retryAfter, options, octokit, retryCount) => { + if (retryCount < 2) return true; + }, + onSecondaryRateLimit: (retryAfter, options, octokit) => true, + }, + }); + + const { data } = await octokit.repos.listForAuthenticatedUser({ + sort: 'updated', + per_page: 100 + }); + + return data; + }, + staleTime: 1000 * 60 * 5, // 5 minutes + enabled: !!accessToken + }); +} \ No newline at end of file