@@ -31,21 +31,18 @@ export async function submitSupportFeedback(
3131 const input = parsed . data ;
3232
3333 try {
34- if ( ! NEXT_PUBLIC_DASHBOARD_CLIENT_ID ) {
35- return { error : "NEXT_PUBLIC_DASHBOARD_CLIENT_ID not configured" } ;
36- }
37-
38- if ( ! NEXT_PUBLIC_THIRDWEB_API_HOST ) {
39- return { error : "NEXT_PUBLIC_THIRDWEB_API_HOST not configured" } ;
40- }
34+ // Use fallback client ID if not configured (following codebase pattern)
35+ const clientId = NEXT_PUBLIC_DASHBOARD_CLIENT_ID || "dummy-build-client" ;
36+ const vercelEnv = getVercelEnv ( ) ;
37+ const isPreview = vercelEnv === "preview" || vercelEnv === "development" ;
4138
4239 const response = await fetch (
4340 `${ NEXT_PUBLIC_THIRDWEB_API_HOST } /v1/csat/saveCSATFeedback` ,
4441 {
4542 method : "POST" ,
4643 headers : {
4744 "Content-Type" : "application/json" ,
48- "x-service-api-key" : NEXT_PUBLIC_DASHBOARD_CLIENT_ID ,
45+ "x-service-api-key" : clientId ,
4946 } ,
5047 body : JSON . stringify ( {
5148 rating : input . rating ,
@@ -56,9 +53,6 @@ export async function submitSupportFeedback(
5653 ) ;
5754
5855 if ( ! response . ok ) {
59- // Check if we're in a preview environment (Vercel preview deployments)
60- const vercelEnv = getVercelEnv ( ) ;
61- const isPreview = vercelEnv === "preview" || vercelEnv === "development" ;
6256 if ( response . status === 404 && isPreview ) {
6357 // Only in preview/dev, simulate success if the endpoint isn't deployed yet
6458 console . debug (
0 commit comments