File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
app/[orgShortcode]/_components Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,9 @@ export default function SidebarContent() {
83
83
</ div >
84
84
< div className = "flex w-full flex-row items-center justify-between p-1" >
85
85
< span className = { cn ( 'font-display text-base-11 text-sm' ) } > UnInbox</ span >
86
- < span className = { cn ( 'text-base-11 text-xs' ) } > v0.1.0</ span >
86
+ < span className = { cn ( 'text-base-11 text-xs' ) } >
87
+ v{ env . NEXT_PUBLIC_APP_VERSION }
88
+ </ span >
87
89
</ div >
88
90
</ div >
89
91
) ;
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ if (!IS_BROWSER) {
11
11
? 'true'
12
12
: 'false' ;
13
13
14
+ process . env . APP_VERSION = process . env . npm_package_version ;
15
+
14
16
// DON'T ADD ANY SENSITIVE ENVIRONMENT VARIABLES HERE
15
17
// All variables defined here will be exposed to the client
16
18
const PUBLIC_ENV_LIST = [
@@ -21,7 +23,8 @@ if (!IS_BROWSER) {
21
23
'REALTIME_HOST' ,
22
24
'REALTIME_PORT' ,
23
25
'TURNSTILE_SITE_KEY' ,
24
- 'EE_ENABLED'
26
+ 'EE_ENABLED' ,
27
+ 'APP_VERSION'
25
28
] ;
26
29
27
30
PUBLIC_ENV_LIST . forEach ( ( key ) => {
@@ -41,7 +44,8 @@ export const env = createEnv({
41
44
NEXT_PUBLIC_REALTIME_HOST : z . string ( ) ,
42
45
NEXT_PUBLIC_REALTIME_PORT : z . coerce . number ( ) ,
43
46
NEXT_PUBLIC_TURNSTILE_SITE_KEY : z . string ( ) . optional ( ) ,
44
- NEXT_PUBLIC_EE_ENABLED : z . enum ( [ 'true' , 'false' ] )
47
+ NEXT_PUBLIC_EE_ENABLED : z . enum ( [ 'true' , 'false' ] ) ,
48
+ NEXT_PUBLIC_APP_VERSION : z . string ( ) . default ( 'development' )
45
49
} ,
46
50
// process.env is added here to allow access while on server, it is tree-shaken out in the browser
47
51
// if you check in the browser, you will see runtimeEnv is set to window.__ENV only
You can’t perform that action at this time.
0 commit comments