Plans
-
-
+
Your current plan is{" "}
{data?.plan || "free"}
+ {data?.plan === "pro" ? (
+
+
+
+ ) : null}
{description}
) : null}
- {actions ?
{actions}
: null}
+ {actions ? (
+
{actions}
+ ) : null}
{/* potentially `asChild` */}
{children}
diff --git a/apps/web/src/components/layout/app-footer.tsx b/apps/web/src/components/layout/app-footer.tsx
new file mode 100644
index 00000000..7b3d13bf
--- /dev/null
+++ b/apps/web/src/components/layout/app-footer.tsx
@@ -0,0 +1,30 @@
+import Link from "next/link";
+
+import { Shell } from "../dashboard/shell";
+
+export function AppFooter() {
+ return (
+
+ );
+}
diff --git a/apps/web/src/components/layout/footer.tsx b/apps/web/src/components/layout/footer.tsx
deleted file mode 100644
index df32bb65..00000000
--- a/apps/web/src/components/layout/footer.tsx
+++ /dev/null
@@ -1,47 +0,0 @@
-import Link from "next/link";
-
-export function Footer() {
- return (
-
- );
-}
diff --git a/apps/web/src/components/layout/marketing-footer.tsx b/apps/web/src/components/layout/marketing-footer.tsx
new file mode 100644
index 00000000..93d6805d
--- /dev/null
+++ b/apps/web/src/components/layout/marketing-footer.tsx
@@ -0,0 +1,64 @@
+import Link from "next/link";
+import { ArrowUpRight } from "lucide-react";
+
+import { cn } from "@/lib/utils";
+import { Shell } from "../dashboard/shell";
+
+interface Props {
+ className?: string;
+}
+
+export function MarketingFooter({ className }: Props) {
+ return (
+
+ );
+}
+
+function FooterLink({ href, label }: Record<"href" | "label", string>) {
+ const isExternal = href.startsWith("http");
+
+ const LinkSlot = isExternal ? "a" : Link;
+
+ const externalProps = isExternal
+ ? {
+ target: "_blank",
+ rel: "noreferrer",
+ }
+ : {};
+
+ return (
+
+ {label}
+ {isExternal ? : null}
+
+ );
+}
diff --git a/apps/web/src/components/layout/marketing-layout.tsx b/apps/web/src/components/layout/marketing-layout.tsx
index cadd0d15..85d97f33 100644
--- a/apps/web/src/components/layout/marketing-layout.tsx
+++ b/apps/web/src/components/layout/marketing-layout.tsx
@@ -1,4 +1,4 @@
-import { Footer } from "./footer";
+import { MarketingFooter } from "./marketing-footer";
import { MarketingHeader } from "./marketing-header";
export function MarketingLayout({ children }: { children: React.ReactNode }) {
@@ -8,7 +8,7 @@ export function MarketingLayout({ children }: { children: React.ReactNode }) {
{children}
-
+
);
}
diff --git a/apps/web/src/components/marketing/plans.tsx b/apps/web/src/components/marketing/plans.tsx
index 7a1000e4..93a9bf24 100644
--- a/apps/web/src/components/marketing/plans.tsx
+++ b/apps/web/src/components/marketing/plans.tsx
@@ -1,77 +1,24 @@
import Link from "next/link";
import { Check } from "lucide-react";
+import type { PlanProps } from "@/config/plans";
+import { plansConfig } from "@/config/plans";
import { cn } from "@/lib/utils";
import { Shell } from "../dashboard/shell";
+import { LoadingAnimation } from "../loading-animation";
import { Button } from "../ui/button";
-interface Plan {
- title: string;
- description: string;
- cost: number | string;
- features: string[];
- action?: {
- text: string;
- link: string;
- };
- disabled?: boolean;
-}
-
-const plans: Record<"hobby" | "pro" | "enterprise", Plan> = {
- hobby: {
- title: "Hobby",
- description: "Get started now and upgrade once reaching the limits.",
- cost: 0,
- features: [
- "5 monitors",
- "1 status page",
- "subdomain",
- "10m, 30m, 1h checks",
- ],
- action: {
- text: "Start Now",
- link: "/app/sign-up?plan=hobby",
- },
- },
- pro: {
- title: "Pro",
- description: "Scale and build monitors for all your services.",
- cost: 29,
- features: [
- "20 monitors",
- "5 status page",
- "custom domain",
- "1m, 5m, 10m, 30m, 1h checks",
- "5 team members",
- ],
- action: {
- text: "Start Now",
- link: "/app/sign-up?plan=pro",
- },
- },
- enterprise: {
- title: "Enterprise",
- description: "Dedicated support and needs for your company.",
- cost: "Lets talk",
- features: [],
- action: {
- text: "Schedule call",
- link: "https://cal.com/thibault-openstatus/30min",
- },
- },
-};
-
export function Plans() {
return (
@@ -79,11 +26,11 @@ export function Plans() {
);
}
-interface Props extends Plan {
+interface Props extends PlanProps {
className?: string;
}
-function Plan({
+export function Plan({
title,
description,
cost,
@@ -91,6 +38,7 @@ function Plan({
action,
disabled,
className,
+ loading,
}: Props) {
return (
{description}
- {cost}
{typeof cost === "number" ? (
- /month
- ) : null}
+ <>
+ {cost} €
+ /month
+ >
+ ) : (
+ {cost}
+ )}