Skip to content

Commit 3b60b13

Browse files
committed
Merge branch 'canary' into sync-integrations-makeswift
2 parents e848206 + 5605e32 commit 3b60b13

File tree

66 files changed

+227
-575
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+227
-575
lines changed

core/app/[locale]/(default)/(auth)/login/forgot-password/_actions/reset-password.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import { client } from '~/client';
1010
import { graphql } from '~/client/graphql';
1111

1212
const ResetPasswordMutation = graphql(`
13-
mutation ResetPasswordMutation($input: RequestResetPasswordInput!, $reCaptcha: ReCaptchaV2Input) {
13+
mutation ResetPasswordMutation($input: RequestResetPasswordInput!) {
1414
customer {
15-
requestResetPassword(input: $input, reCaptchaV2: $reCaptcha) {
15+
requestResetPassword(input: $input) {
1616
__typename
1717
errors {
1818
__typename
@@ -28,8 +28,6 @@ const ResetPasswordMutation = graphql(`
2828
export const resetPassword = async (
2929
_lastResult: { lastResult: SubmissionResult | null; successMessage?: string },
3030
formData: FormData,
31-
// TODO: add recaptcha token
32-
// reCaptchaToken,
3331
): Promise<{ lastResult: SubmissionResult | null; successMessage?: string }> => {
3432
const t = await getTranslations('Auth.Login.ForgotPassword');
3533

@@ -47,7 +45,6 @@ export const resetPassword = async (
4745
email: submission.value.email,
4846
path: '/change-password',
4947
},
50-
// ...(reCaptchaToken && { reCaptchaV2: { token: reCaptchaToken } }),
5148
},
5249
fetchOptions: {
5350
cache: 'no-store',

core/app/[locale]/(default)/(auth)/login/forgot-password/page.tsx

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,10 @@
11
import { Metadata } from 'next';
22
import { getTranslations, setRequestLocale } from 'next-intl/server';
33

4-
// import { client } from '~/client';
5-
// import { graphql } from '~/client/graphql';
6-
// import { revalidate } from '~/client/revalidate-target';
7-
// import { bypassReCaptcha } from '~/lib/bypass-recaptcha';
8-
94
import { ForgotPasswordSection } from '@/vibes/soul/sections/forgot-password-section';
105

116
import { resetPassword } from './_actions/reset-password';
127

13-
// TODO: add recaptcha token
14-
// const ResetPageQuery = graphql(`
15-
// query ResetPageQuery {
16-
// site {
17-
// settings {
18-
// reCaptcha {
19-
// isEnabledOnStorefront
20-
// siteKey
21-
// }
22-
// }
23-
// }
24-
// }
25-
// `);
26-
278
interface Props {
289
params: Promise<{ locale: string }>;
2910
}
@@ -45,13 +26,6 @@ export default async function Reset(props: Props) {
4526

4627
const t = await getTranslations('Auth.Login.ForgotPassword');
4728

48-
// TODO: add recaptcha token
49-
// const { data } = await client.fetch({
50-
// document: ResetPageQuery,
51-
// fetchOptions: { next: { revalidate } },
52-
// });
53-
// const recaptchaSettings = await bypassReCaptcha(data.site.settings?.reCaptcha);
54-
5529
return (
5630
<ForgotPasswordSection action={resetPassword} subtitle={t('subtitle')} title={t('title')} />
5731
);

core/app/[locale]/(default)/(auth)/register/_actions/register-customer.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,9 @@ import { getCartId } from '~/lib/cart';
1717
import { ADDRESS_FIELDS_NAME_PREFIX, CUSTOMER_FIELDS_NAME_PREFIX } from './prefixes';
1818

1919
const RegisterCustomerMutation = graphql(`
20-
mutation RegisterCustomerMutation(
21-
$input: RegisterCustomerInput!
22-
$reCaptchaV2: ReCaptchaV2Input
23-
) {
20+
mutation RegisterCustomerMutation($input: RegisterCustomerInput!) {
2421
customer {
25-
registerCustomer(input: $input, reCaptchaV2: $reCaptchaV2) {
22+
registerCustomer(input: $input) {
2623
customer {
2724
firstName
2825
lastName
@@ -360,7 +357,6 @@ export async function registerCustomer<F extends Field>(
360357
document: RegisterCustomerMutation,
361358
variables: {
362359
input,
363-
// ...(recaptchaToken && { reCaptchaV2: { token: recaptchaToken } }),
364360
},
365361
fetchOptions: { cache: 'no-store' },
366362
});

core/app/[locale]/(default)/(auth)/register/page-data.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { getSessionCustomerAccessToken } from '~/auth';
44
import { client } from '~/client';
55
import { graphql, VariablesOf } from '~/client/graphql';
66
import { FormFieldsFragment } from '~/data-transformers/form-field-transformer/fragment';
7-
import { bypassReCaptcha } from '~/lib/bypass-recaptcha';
87

98
const RegisterCustomerQuery = graphql(
109
`
@@ -25,12 +24,6 @@ const RegisterCustomerQuery = graphql(
2524
}
2625
}
2726
}
28-
settings {
29-
reCaptcha {
30-
isEnabledOnStorefront
31-
siteKey
32-
}
33-
}
3427
}
3528
geography {
3629
countries {
@@ -76,16 +69,13 @@ export const getRegisterCustomerQuery = cache(async ({ address, customer }: Prop
7669
const customerFields = response.data.site.settings?.formFields.customer;
7770
const countries = response.data.geography.countries;
7871

79-
const reCaptchaSettings = await bypassReCaptcha(response.data.site.settings?.reCaptcha);
80-
8172
if (!addressFields || !customerFields) {
8273
return null;
8374
}
8475

8576
return {
8677
addressFields,
8778
customerFields,
88-
reCaptchaSettings,
8979
countries,
9080
};
9181
});

core/app/[locale]/(default)/(auth)/register/page.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ import { Metadata } from 'next';
22
import { notFound } from 'next/navigation';
33
import { getTranslations, setRequestLocale } from 'next-intl/server';
44

5-
// TODO: Add recaptcha token
6-
// import { bypassReCaptcha } from '~/lib/bypass-recaptcha';
7-
85
import { DynamicFormSection } from '@/vibes/soul/sections/dynamic-form-section';
96
import {
107
formFieldTransformer,
@@ -52,7 +49,6 @@ export default async function Register({ params }: Props) {
5249
}
5350

5451
const { addressFields, customerFields, countries } = registerCustomerData;
55-
// const reCaptcha = await bypassReCaptcha(reCaptchaSettings);
5652

5753
const fields = transformFieldsToLayout(
5854
[

core/app/[locale]/(default)/account/addresses/_actions/update-address.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { FieldNameToFieldId } from '~/data-transformers/form-field-transformer/u
1414

1515
import { type State } from './address-action';
1616

17-
export const UpdateCustomerAddressMutation = graphql(`
17+
const UpdateCustomerAddressMutation = graphql(`
1818
mutation UpdateCustomerAddressMutation($input: UpdateCustomerAddressInput!) {
1919
customer {
2020
updateCustomerAddress(input: $input) {

core/app/[locale]/(default)/account/wishlists/[id]/_components/wishlist-analytics-provider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function WishlistAnalyticsProvider(
3131
);
3232
}
3333

34-
export function WishlistAnalyticsProviderResolved({
34+
function WishlistAnalyticsProviderResolved({
3535
children,
3636
data,
3737
}: PropsWithChildren<{ data: Streamable<AddToCartContext[]> }>) {

core/app/[locale]/(default)/blog/page-data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const BlogPostsPageQuery = graphql(
6262
[PaginationFragment],
6363
);
6464

65-
export interface BlogPostsFiltersInput {
65+
interface BlogPostsFiltersInput {
6666
tag: string | null;
6767
}
6868

core/app/[locale]/(default)/cart/_actions/update-quantity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export type CartSelectedOptionsInput = ReturnType<
2929
type Variables = VariablesOf<typeof UpdateCartLineItemMutation>;
3030
type UpdateCartLineItemInput = Variables['input'];
3131

32-
export interface UpdateProductQuantityParams extends CartLineItemInput {
32+
interface UpdateProductQuantityParams extends CartLineItemInput {
3333
lineItemEntityId: UpdateCartLineItemInput['lineItemEntityId'];
3434
}
3535

core/app/[locale]/(default)/cart/_components/cart-analytics-provider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function CartAnalyticsProvider(
3232
);
3333
}
3434

35-
export function CartAnalyticsProviderResolved({
35+
function CartAnalyticsProviderResolved({
3636
children,
3737
data,
3838
}: PropsWithChildren<{ data: Streamable<AddToCartContext[]> }>) {

0 commit comments

Comments
 (0)