warnings fixed

This commit is contained in:
brkcvn 2023-11-15 13:16:34 +03:00
parent 77408259d2
commit 9263d1063c
15 changed files with 24 additions and 19 deletions

View File

@ -2,10 +2,10 @@ import { loginCustomer } from 'lib/shopify';
import { revalidatePath } from 'next/cache'; import { revalidatePath } from 'next/cache';
import { cookies } from 'next/headers'; import { cookies } from 'next/headers';
import { redirect } from 'next/navigation'; import { redirect } from 'next/navigation';
import AuthLayout from '../component/AuthLayout'; import AuthLayout from '../component/auth-layout';
import FormButton from '../component/FormButton'; import FormButton from '../component/form-button';
import FormFooter from '../component/FormFooter'; import FormFooter from '../component/form-footer';
import FormHeader from '../component/FormHeader'; import FormHeader from '../component/form-header';
let emailError: string | null = null; let emailError: string | null = null;
let passwordError: string | null = null; let passwordError: string | null = null;

View File

@ -1,6 +1,6 @@
import { getCustomer } from 'lib/shopify'; import { getCustomer } from 'lib/shopify';
import { cookies } from 'next/headers'; import { cookies } from 'next/headers';
import SignOutSection from './component/SignOutSection'; import SignOutSection from './component/sign-out-section';
async function AccountPage({ searchParams }: { searchParams: { [key: string]: string } }) { async function AccountPage({ searchParams }: { searchParams: { [key: string]: string } }) {
const token = cookies().get('customerAccessToken')?.value as string; const token = cookies().get('customerAccessToken')?.value as string;

View File

@ -1,9 +1,9 @@
import { recoverCustomersPassword } from 'lib/shopify'; import { recoverCustomersPassword } from 'lib/shopify';
import { revalidatePath } from 'next/cache'; import { revalidatePath } from 'next/cache';
import AuthLayout from '../component/AuthLayout'; import AuthLayout from '../component/auth-layout';
import FormButton from '../component/FormButton'; import FormButton from '../component/form-button';
import FormFooter from '../component/FormFooter'; import FormFooter from '../component/form-footer';
import FormHeader from '../component/FormHeader'; import FormHeader from '../component/form-header';
let emailError: string | null = null; let emailError: string | null = null;
let isSubmited: boolean = false; let isSubmited: boolean = false;

View File

@ -2,10 +2,10 @@ import { createCustomer, loginCustomer } from 'lib/shopify';
import { revalidatePath } from 'next/cache'; import { revalidatePath } from 'next/cache';
import { cookies } from 'next/headers'; import { cookies } from 'next/headers';
import { redirect } from 'next/navigation'; import { redirect } from 'next/navigation';
import AuthLayout from '../component/AuthLayout'; import AuthLayout from '../component/auth-layout';
import FormButton from '../component/FormButton'; import FormButton from '../component/form-button';
import FormFooter from '../component/FormFooter'; import FormFooter from '../component/form-footer';
import FormHeader from '../component/FormHeader'; import FormHeader from '../component/form-header';
let emailError: string | null = null; let emailError: string | null = null;
let passwordError: string | null = null; let passwordError: string | null = null;

View File

@ -2,9 +2,9 @@ import { resetCustomersPassword } from 'lib/shopify';
import { revalidatePath } from 'next/cache'; import { revalidatePath } from 'next/cache';
import { cookies } from 'next/headers'; import { cookies } from 'next/headers';
import { redirect } from 'next/navigation'; import { redirect } from 'next/navigation';
import AuthLayout from '../../../component/AuthLayout'; import AuthLayout from '../../../component/auth-layout';
import FormButton from '../../../component/FormButton'; import FormButton from '../../../component/form-button';
import FormHeader from '../../../component/FormHeader'; import FormHeader from '../../../component/form-header';
let errorMessage: string | null = null; let errorMessage: string | null = null;
let passwordError: string | null = null; let passwordError: string | null = null;

View File

@ -353,6 +353,7 @@ export type UserError = DisplayableError & {
message: Scalars['String']; message: Scalars['String'];
}; };
/** Return type for `customerAccessToken` mutation. */
export type CustomerAccessTokenCreatePayload = { export type CustomerAccessTokenCreatePayload = {
__typename?: 'CustomerAccessTokenCreatePayload'; __typename?: 'CustomerAccessTokenCreatePayload';
/** The newly created customer access token object. */ /** The newly created customer access token object. */
@ -371,6 +372,7 @@ export type CustomerCreatePayload = {
__typename?: 'CustomerCreatePayload'; __typename?: 'CustomerCreatePayload';
/** The created customer object. */ /** The created customer object. */
customer?: Maybe<Customer>; customer?: Maybe<Customer>;
customerUserErrors: Array<CustomerUserError>;
/** The list of errors that occurred from executing the mutation. */ /** The list of errors that occurred from executing the mutation. */
/** /**
* The list of errors that occurred from executing the mutation. * The list of errors that occurred from executing the mutation.
@ -378,6 +380,7 @@ export type CustomerCreatePayload = {
*/ */
}; };
/** Return type for `customerRecover` mutation. */
export type CustomerRecoverPayload = { export type CustomerRecoverPayload = {
__typename?: 'CustomerRecoverPayload'; __typename?: 'CustomerRecoverPayload';
/** The list of errors that occurred from executing the mutation. */ /** The list of errors that occurred from executing the mutation. */
@ -389,6 +392,8 @@ export type CustomerRecoverPayload = {
userErrors: Array<UserError>; userErrors: Array<UserError>;
}; };
/** Return type for `customerReset` mutation. */
export type CustomerResetPayload = { export type CustomerResetPayload = {
__typename?: 'CustomerResetPayload'; __typename?: 'CustomerResetPayload';
/** The customer object which was reset. */ /** The customer object which was reset. */

View File

@ -1,5 +1,5 @@
import { NextRequest, NextResponse } from 'next/server'; import { NextRequest, NextResponse } from 'next/server';
import isAuthenticated from './lib/isAuthenticated'; import isAuthenticated from './lib/is-authenticated';
export const config = { export const config = {
matcher: ['/checkout', '/account', '/account/:path*'], matcher: ['/checkout', '/account', '/account/:path*'],