File tree Expand file tree Collapse file tree
components/SiteSettingsPage Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,7 +52,9 @@ const LoginView = ({ params }: LoginViewProps) => {
5252 fetchPolicy : "network-only" ,
5353 } ,
5454 ) ;
55- const externalAuthentications = externalAuthenticationsStaging ?? externalAuthenticationsMain ;
55+ const externalAuthentications = isStagingSchema ( )
56+ ? externalAuthenticationsStaging
57+ : externalAuthenticationsMain ;
5658 const externalAuthenticationsLoading =
5759 externalAuthenticationsLoadingMain || externalAuthenticationsLoadingStaging ;
5860
Original file line number Diff line number Diff line change @@ -213,20 +213,24 @@ const SiteSettingsPage = (props: SiteSettingsPageProps) => {
213213 </ DashboardCard >
214214 </ Box >
215215
216- < Divider />
216+ { isStagingSchema ( ) && (
217+ < >
218+ < Divider />
217219
218- < Box
219- display = "grid"
220- __gridTemplateColumns = "1fr 3fr"
221- paddingLeft = { 6 }
222- paddingBottom = { 8 }
223- >
224- < PageSectionHeader
225- title = { intl . formatMessage ( messages . sectionPasswordLoginTitle ) }
226- description = { intl . formatMessage ( messages . sectionPasswordLoginDescription ) }
227- />
228- < SitePasswordLoginCard value = { data . passwordLoginMode } onChange = { change } />
229- </ Box >
220+ < Box
221+ display = "grid"
222+ __gridTemplateColumns = "1fr 3fr"
223+ paddingLeft = { 6 }
224+ paddingBottom = { 8 }
225+ >
226+ < PageSectionHeader
227+ title = { intl . formatMessage ( messages . sectionPasswordLoginTitle ) }
228+ description = { intl . formatMessage ( messages . sectionPasswordLoginDescription ) }
229+ />
230+ < SitePasswordLoginCard value = { data . passwordLoginMode } onChange = { change } />
231+ </ Box >
232+ </ >
233+ ) }
230234
231235 < Divider />
232236
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ const SiteSettings = () => {
3131 displayLoader : true ,
3232 skip : isMainSchema ( ) ,
3333 } ) ;
34- const siteSettings = siteSettingsStaging ?? siteSettingsMain ;
34+ const siteSettings = isStagingSchema ( ) ? siteSettingsStaging : siteSettingsMain ;
3535
3636 const onUpdateCompleted = ( data : {
3737 shopSettingsUpdate ?: { errors : unknown [ ] } | null ;
@@ -58,6 +58,8 @@ const SiteSettings = () => {
5858
5959 const updateOpts = isStagingSchema ( ) ? updateShopSettingsOptsStaging : updateShopSettingsOpts ;
6060
61+ // Staging schema errors have a superset of ShopErrorCode values,
62+ // but they share the same shape (code, field, message) used by UI components.
6163 const errors = [
6264 ...( updateOpts . data ?. shopSettingsUpdate ?. errors || [ ] ) ,
6365 ...( updateOpts . data ?. shopAddressUpdate ?. errors || [ ] ) ,
You can’t perform that action at this time.
0 commit comments