File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
packages/web/src/app/[domain]/settings Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { getMe, getOrgAccountRequests } from "@/actions";
11
11
import { ServiceErrorException } from "@/lib/serviceError" ;
12
12
import { getOrgFromDomain } from "@/data/org" ;
13
13
import { OrgRole } from "@prisma/client" ;
14
+ import { env } from "@/env.mjs" ;
14
15
15
16
export const metadata : Metadata = {
16
17
title : "Settings" ,
@@ -84,10 +85,12 @@ export default async function SettingsLayout({
84
85
title : "API Keys" ,
85
86
href : `/${ domain } /settings/apiKeys` ,
86
87
} ,
87
- {
88
- title : "License" ,
89
- href : `/${ domain } /settings/license` ,
90
- }
88
+ ...( env . NEXT_PUBLIC_SOURCEBOT_CLOUD_ENVIRONMENT === undefined ? [
89
+ {
90
+ title : "License" ,
91
+ href : `/${ domain } /settings/license` ,
92
+ }
93
+ ] : [ ] ) ,
91
94
]
92
95
93
96
return (
Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ import { Button } from "@/components/ui/button";
3
3
import { Info , Mail } from "lucide-react" ;
4
4
import { getOrgMembers } from "@/actions" ;
5
5
import { isServiceError } from "@/lib/utils" ;
6
- import { ServiceErrorException } from "@/lib/serviceError" ;
6
+ import { notFound , ServiceErrorException } from "@/lib/serviceError" ;
7
+ import { env } from "@/env.mjs" ;
7
8
8
9
interface LicensePageProps {
9
10
params : {
@@ -12,6 +13,10 @@ interface LicensePageProps {
12
13
}
13
14
14
15
export default async function LicensePage ( { params : { domain } } : LicensePageProps ) {
16
+ if ( env . NEXT_PUBLIC_SOURCEBOT_CLOUD_ENVIRONMENT !== undefined ) {
17
+ notFound ( ) ;
18
+ }
19
+
15
20
const licenseKey = await getLicenseKey ( ) ;
16
21
const entitlements = await getEntitlements ( ) ;
17
22
const plan = await getPlan ( ) ;
You can’t perform that action at this time.
0 commit comments