11import { getTeamBySlug } from "@/api/team" ;
2+ import { Button } from "@/components/ui/button" ;
23import { PosthogIdentifierServer } from "components/wallets/PosthogIdentifierServer" ;
4+ import { ArrowRightIcon } from "lucide-react" ;
5+ import Link from "next/link" ;
36import { redirect } from "next/navigation" ;
47import { Suspense } from "react" ;
58import { EnsureValidConnectedWalletLoginServer } from "../../components/EnsureValidConnectedWalletLogin/EnsureValidConnectedWalletLoginServer" ;
@@ -28,6 +31,10 @@ export default async function RootTeamLayout(props: {
2831 return (
2932 < div className = "flex min-h-dvh flex-col" >
3033 < div className = "flex grow flex-col" >
34+ { team . billingPlan === "starter_legacy" && (
35+ < StarterLegacyDiscontinuedBanner teamSlug = { team_slug } />
36+ ) }
37+
3138 { team . billingStatus === "pastDue" && (
3239 < PastDueBanner teamSlug = { team_slug } />
3340 ) }
@@ -50,3 +57,31 @@ export default async function RootTeamLayout(props: {
5057 </ div >
5158 ) ;
5259}
60+
61+ function StarterLegacyDiscontinuedBanner ( props : {
62+ teamSlug : string ;
63+ } ) {
64+ return (
65+ < div className = "border-red-600 border-b bg-red-50 px-4 py-6 text-red-800 dark:border-red-700 dark:bg-red-950 dark:text-red-100" >
66+ < div className = "text-center" >
67+ < p > Starter legacy plans are being discontinued on May 31, 2025</ p >
68+ < p >
69+ To prevent service interruptions and losing access to your current
70+ features select a new plan
71+ </ p >
72+ < Button
73+ asChild
74+ size = "sm"
75+ className = "mt-3 gap-2 border border-red-600 bg-red-100 text-red-800 hover:bg-red-200 dark:border-red-700 dark:bg-red-900 dark:text-red-100 dark:hover:bg-red-800"
76+ >
77+ < Link
78+ href = { `/team/${ props . teamSlug } /~/settings/billing?showPlans=true` }
79+ >
80+ Select a new plan
81+ < ArrowRightIcon className = "size-4" />
82+ </ Link >
83+ </ Button >
84+ </ div >
85+ </ div >
86+ ) ;
87+ }
0 commit comments