From c1d3151a50d4da5d6655b7c33fe1d90131fb926d Mon Sep 17 00:00:00 2001
From: Amaury <1293565+amaury1729@users.noreply.github.com>
Date: Thu, 21 Dec 2023 10:11:40 +0100
Subject: [PATCH] feat: Add message when no plan
---
src/components/Dashboard.tsx | 4 ++--
.../{GetStartedFreeTrial.tsx => GetStartedNoPlan.tsx} | 2 +-
src/components/GetStarted/index.ts | 2 +-
src/pages/index.tsx | 7 ++-----
4 files changed, 6 insertions(+), 9 deletions(-)
rename src/components/GetStarted/{GetStartedFreeTrial.tsx => GetStartedNoPlan.tsx} (83%)
diff --git a/src/components/Dashboard.tsx b/src/components/Dashboard.tsx
index e7ef1708..f45f5b53 100644
--- a/src/components/Dashboard.tsx
+++ b/src/components/Dashboard.tsx
@@ -3,7 +3,7 @@ import React from "react";
import { StripeMananageButton } from "../components/StripeManageButton";
import {
- GetStartedFreeTrial,
+ GetStartedNoPlan,
GetStartedLicense,
GetStartedSaas,
} from "../components/GetStarted";
@@ -104,6 +104,6 @@ function showContent(
>
);
default:
- return ;
+ return ;
}
}
diff --git a/src/components/GetStarted/GetStartedFreeTrial.tsx b/src/components/GetStarted/GetStartedNoPlan.tsx
similarity index 83%
rename from src/components/GetStarted/GetStartedFreeTrial.tsx
rename to src/components/GetStarted/GetStartedNoPlan.tsx
index 83a0d2a7..c936bee9 100644
--- a/src/components/GetStarted/GetStartedFreeTrial.tsx
+++ b/src/components/GetStarted/GetStartedNoPlan.tsx
@@ -2,7 +2,7 @@ import { Card, Text } from "@geist-ui/react";
import Link from "next/link";
import React from "react";
-export function GetStartedFreeTrial(): React.ReactElement {
+export function GetStartedNoPlan(): React.ReactElement {
return (
Select a Plan
diff --git a/src/components/GetStarted/index.ts b/src/components/GetStarted/index.ts
index 5d51867b..1b851d39 100644
--- a/src/components/GetStarted/index.ts
+++ b/src/components/GetStarted/index.ts
@@ -1,3 +1,3 @@
export * from "./GetStartedLicense";
export * from "./GetStartedSaas";
-export * from "./GetStartedFreeTrial";
+export * from "./GetStartedNoPlan";
diff --git a/src/pages/index.tsx b/src/pages/index.tsx
index 2c52df61..e404c134 100644
--- a/src/pages/index.tsx
+++ b/src/pages/index.tsx
@@ -27,6 +27,7 @@ export default function Index(): React.ReactElement {
const [emailSent, setEmailSent] = useState(false); // Set if we sent an email upon confirmation. Only do it once.
useEffect(() => {
+ console.log("userFinishedLoading", userFinishedLoading);
if (isRedirecting) {
return;
}
@@ -71,11 +72,7 @@ export default function Index(): React.ReactElement {
router.replace("/login").catch(sentryException);
} else if (userFinishedLoading && user) {
setIsRedirecting(true);
- if (subscription) {
- router.replace("/dashboard").catch(sentryException);
- } else {
- router.replace("/pricing").catch(sentryException);
- }
+ router.replace("/dashboard").catch(sentryException);
}
}, [
isRedirecting,