Skip to content

Commit

Permalink
feat: Add message when no plan
Browse files Browse the repository at this point in the history
  • Loading branch information
amaury1093 committed Dec 21, 2023
1 parent 6a25947 commit c1d3151
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/components/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";

import { StripeMananageButton } from "../components/StripeManageButton";
import {
GetStartedFreeTrial,
GetStartedNoPlan,
GetStartedLicense,
GetStartedSaas,
} from "../components/GetStarted";
Expand Down Expand Up @@ -104,6 +104,6 @@ function showContent(
</>
);
default:
return <GetStartedFreeTrial />;
return <GetStartedNoPlan />;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Card>
<Text h4>Select a Plan</Text>
Expand Down
2 changes: 1 addition & 1 deletion src/components/GetStarted/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from "./GetStartedLicense";
export * from "./GetStartedSaas";
export * from "./GetStartedFreeTrial";
export * from "./GetStartedNoPlan";
7 changes: 2 additions & 5 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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,
Expand Down

1 comment on commit c1d3151

@vercel
Copy link

@vercel vercel bot commented on c1d3151 Dec 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.