1
1
import { getTeamBySlug } from "@/api/team" ;
2
+ import { Button } from "@/components/ui/button" ;
2
3
import { PosthogIdentifierServer } from "components/wallets/PosthogIdentifierServer" ;
4
+ import { ArrowRightIcon } from "lucide-react" ;
5
+ import Link from "next/link" ;
3
6
import { redirect } from "next/navigation" ;
4
7
import { Suspense } from "react" ;
5
8
import { EnsureValidConnectedWalletLoginServer } from "../../components/EnsureValidConnectedWalletLogin/EnsureValidConnectedWalletLoginServer" ;
@@ -28,6 +31,10 @@ export default async function RootTeamLayout(props: {
28
31
return (
29
32
< div className = "flex min-h-dvh flex-col" >
30
33
< div className = "flex grow flex-col" >
34
+ { team . billingPlan === "starter_legacy" && (
35
+ < StarterLegacyDiscontinuedBanner teamSlug = { team_slug } />
36
+ ) }
37
+
31
38
{ team . billingStatus === "pastDue" && (
32
39
< PastDueBanner teamSlug = { team_slug } />
33
40
) }
@@ -50,3 +57,31 @@ export default async function RootTeamLayout(props: {
50
57
</ div >
51
58
) ;
52
59
}
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