Skip to content

Commit 9541fc5

Browse files
Disable free trial (#2219)
* Commment announcementBanner * Disable free trial * ocd
1 parent 617335b commit 9541fc5

File tree

5 files changed

+7
-44
lines changed

5 files changed

+7
-44
lines changed

components/onboarding/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import { GLOBAL_EWS_AUTH_TOKEN_KEY } from "constants/app";
1717
import { walletIds } from "@thirdweb-dev/wallets";
1818
import { OnboardingChoosePlan } from "./ChoosePlan";
1919
import { OnboardingLinkWallet } from "./LinkWallet";
20-
import { useLocalStorage } from "hooks/useLocalStorage";
2120

2221
const skipBilling = (account: Account) => {
2322
return (
@@ -44,7 +43,7 @@ export const Onboarding: React.FC = () => {
4443
const trackEvent = useTrack();
4544
const wallet = useWallet();
4645
const ewsConfirmMutation = useConfirmEmbeddedWallet();
47-
const [claimGrowth] = useLocalStorage("claim-growth-trial", false, true);
46+
const claimGrowth = false;
4847

4948
const [state, setState] = useState<OnboardingState>();
5049
const [account, setAccount] = useState<Account>();

components/settings/Account/Billing/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@ import { BillingPricing } from "./Pricing";
1919
import { OnboardingBilling } from "components/onboarding/Billing";
2020
import { OnboardingModal } from "components/onboarding/Modal";
2121
import { FiExternalLink } from "react-icons/fi";
22-
import { useLocalStorage } from "hooks/useLocalStorage";
2322

2423
interface BillingProps {
2524
account: Account;
2625
}
2726

2827
export const Billing: React.FC<BillingProps> = ({ account }) => {
29-
const [claimGrowth] = useLocalStorage("claim-growth-trial", false, true);
28+
const claimGrowth = false;
3029
const updatePlanMutation = useUpdateAccountPlan();
3130
const {
3231
isOpen: isPaymentMethodOpen,

pages/_app.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import chakraTheme from "../theme";
22
import { ChakraProvider } from "@chakra-ui/react";
33
import { Global, css } from "@emotion/react";
44
import type { DehydratedState } from "@tanstack/react-query";
5-
import { AnnouncementBanner } from "components/notices/AnnouncementBanner";
65
import { ProgressBar } from "components/shared/ProgressBar";
76
import PlausibleProvider from "next-plausible";
87
import { DefaultSeo } from "next-seo";
@@ -242,7 +241,7 @@ const ConsoleApp = memo(function ConsoleApp({
242241
/>
243242

244243
<ChakraProvider theme={chakraThemeWithFonts}>
245-
<AnnouncementBanner />
244+
{/* <AnnouncementBanner /> */}
246245
{isFallback && Component.fallback
247246
? Component.fallback
248247
: getLayout(<Component {...pageProps} />, pageProps)}

pages/dashboard/settings/billing.tsx

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,14 @@ import { useEffect } from "react";
88
import { useRouter } from "next/router";
99
import { useLoggedInUser } from "@3rdweb-sdk/react/hooks/useLoggedInUser";
1010
import { Billing } from "components/settings/Account/Billing";
11-
import { useLocalStorage } from "hooks/useLocalStorage";
1211
import { BillingConnectWalletPrompt } from "components/settings/Account/Billing/ConnectWallet";
1312

1413
const SettingsBillingPage: ThirdwebNextPage = () => {
1514
const { isLoggedIn, isLoading } = useLoggedInUser();
1615
const meQuery = useAccount();
1716
const router = useRouter();
1817
const { data: account } = meQuery;
19-
const [claimGrowth, setClaimGrowth] = useLocalStorage(
20-
"claim-growth-trial",
21-
false,
22-
true,
23-
);
18+
const claimGrowth = false;
2419

2520
useEffect(() => {
2621
let refetchInterval: ReturnType<typeof setInterval> | undefined;
@@ -46,18 +41,9 @@ const SettingsBillingPage: ThirdwebNextPage = () => {
4641
}, [account]);
4742

4843
useEffect(() => {
49-
const {
50-
payment_intent,
51-
source_redirect_slug,
52-
claimGrowth: claimGrowthQuery,
53-
} = router.query;
54-
const hasClaimGrowth = claimGrowthQuery !== undefined;
44+
const { payment_intent, source_redirect_slug } = router.query;
5545

56-
if (hasClaimGrowth) {
57-
setClaimGrowth(true);
58-
}
59-
60-
if (payment_intent || source_redirect_slug || hasClaimGrowth) {
46+
if (payment_intent || source_redirect_slug) {
6147
router.replace("/dashboard/settings/billing");
6248
}
6349
// eslint-disable-next-line react-hooks/exhaustive-deps

pages/pricing.tsx

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,33 +19,13 @@ import { getAbsoluteUrl } from "lib/vercel-utils";
1919
import { PricingSection } from "components/homepage/sections/PricingSection";
2020
import { FAQ_GENERAL, FAQ_PRICING, PRICING_SECTIONS } from "utils/pricing";
2121
import { IoIosInformationCircleOutline } from "react-icons/io";
22-
import { useLocalStorage } from "hooks/useLocalStorage";
23-
import { useRouter } from "next/router";
24-
import { useEffect } from "react";
2522
import { FiExternalLink } from "react-icons/fi";
2623

2724
const TRACKING_CATEGORY = "pricing-page";
2825

2926
const Pricing: ThirdwebNextPage = () => {
30-
const router = useRouter();
31-
const [claimGrowth, setClaimedGrowth] = useLocalStorage(
32-
"claim-growth-trial",
33-
false,
34-
true,
35-
);
36-
3727
const isMobile = useBreakpointValue({ base: true, lg: false }) as boolean;
3828

39-
useEffect(() => {
40-
const { claimGrowth: claimGrowthQuery } = router.query;
41-
42-
if (claimGrowthQuery !== undefined) {
43-
setClaimedGrowth(true);
44-
router.replace("/pricing");
45-
}
46-
// eslint-disable-next-line react-hooks/exhaustive-deps
47-
}, [router]);
48-
4929
return (
5030
<LandingLayout
5131
seo={{
@@ -72,7 +52,7 @@ const Pricing: ThirdwebNextPage = () => {
7252
>
7353
<PricingSection
7454
trackingCategory={TRACKING_CATEGORY}
75-
canTrialGrowth={claimGrowth}
55+
canTrialGrowth={false}
7656
/>
7757

7858
<Flex flexDir="column" gap={20}>

0 commit comments

Comments
 (0)