File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -53,11 +53,20 @@ export function ProjectInfo(props: ProjectInfoProps) {
53
53
54
54
subscriptions . push (
55
55
versionedClient . observable
56
- . request < { studioHost : string } > ( { uri : `/projects/${ projectId } ` } )
56
+ . request < {
57
+ studioHost : string
58
+ metadata ?: { externalStudioHost ?: string }
59
+ } > ( { uri : `/projects/${ projectId } ` , tag : 'dashboard.project-info.studio-host' } )
57
60
. subscribe ( {
58
61
next : ( result ) => {
59
- const { studioHost : host } = result
60
- setStudioHost ( host ? `https://${ host } .sanity.studio` : undefined )
62
+ if ( result . metadata ?. externalStudioHost ) {
63
+ setStudioHost ( result . metadata . externalStudioHost )
64
+ return
65
+ }
66
+
67
+ setStudioHost (
68
+ result . studioHost ? `https://${ result . studioHost } .sanity.studio` : undefined ,
69
+ )
61
70
} ,
62
71
error : ( error ) => {
63
72
console . error ( 'Error while looking for studioHost' , error )
You can’t perform that action at this time.
0 commit comments