Skip to content

Commit 6c2d02c

Browse files
committed
Small adjustments
1 parent b486ee9 commit 6c2d02c

3 files changed

Lines changed: 23 additions & 15 deletions

File tree

src/auth/views/Login.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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

src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff 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

src/siteSettings/views/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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 || []),

0 commit comments

Comments
 (0)