File tree Expand file tree Collapse file tree 4 files changed +9
-3
lines changed
Expand file tree Collapse file tree 4 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ export function CreateUrlDialog({
112112 < p className = "text-xs" > Preview: </ p >
113113 < div className = "text-sm p-4 border rounded-md border-border mb-4 mt-1 flex flex-col gap-1 bg-muted/50 text-muted-foreground" >
114114 < p className = "font-mono mx-auto" >
115- https://${ env . DOMAIN } /
115+ https://${ env . NEXT_PUBLIC_DOMAIN } /
116116 { isRandom ? (
117117 < RandomText generate = { randomCode } />
118118 ) : (
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ export function Dashboard() {
121121 < div className = "flex items-center gap-4" >
122122 < Image src = { logo } alt = "PoliNetwork Logo" className = "h-16 w-16" />
123123 < div className = "gap-2" >
124- < h1 className = "text-3xl font-bold" > $ { env . DOMAIN } </ h1 >
124+ < h1 className = "text-3xl font-bold" > { env . NEXT_PUBLIC_DOMAIN } </ h1 >
125125 < p className = "text-muted-foreground max-md:text-sm" >
126126 PoliNetwork's URL shortener dashboard
127127 </ p >
Original file line number Diff line number Diff line change @@ -5,6 +5,11 @@ const PORT = 6111
55
66// coerce is needed for non-string values, because k8s supports only string env
77export const env = createEnv ( {
8+ client : {
9+ NEXT_PUBLIC_DOMAIN : z
10+ . string ( )
11+ . describe ( "Exposed to client side, same as env.DOMAIN" ) ,
12+ } ,
813 server : {
914 PORT : z . coerce . number ( ) . min ( 1 ) . max ( 65535 ) . default ( PORT ) ,
1015 NODE_ENV : z . enum ( [ "development" , "production" ] ) . default ( "development" ) ,
@@ -28,6 +33,7 @@ export const env = createEnv({
2833 runtimeEnv : {
2934 PORT : process . env . PORT ,
3035 DOMAIN : process . env . DOMAIN ,
36+ NEXT_PUBLIC_DOMAIN : process . env . DOMAIN ,
3137 DB_HOST : process . env . DB_HOST ,
3238 DB_PORT : process . env . DB_PORT ,
3339 DB_USER : process . env . DB_USER ,
Original file line number Diff line number Diff line change @@ -37,5 +37,5 @@ export const copyToClipboard = async (text: string) => {
3737}
3838
3939export function makeShortUrl ( url : UrlRecord ) : string {
40- return `https://${ env . DOMAIN } /${ url . short_code } `
40+ return `https://${ env . NEXT_PUBLIC_DOMAIN } /${ url . short_code } `
4141}
You can’t perform that action at this time.
0 commit comments