leilo2
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
import DashboardSkeleton from '@/app/ui/skeletons';
|
||||||
|
|
||||||
|
export default function Loading() {
|
||||||
|
return <DashboardSkeleton />;
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
import { Card } from '@/app/ui/dashboard/cards';
|
||||||
|
import RevenueChart from '@/app/ui/dashboard/revenue-chart';
|
||||||
|
import LatestInvoices from '@/app/ui/dashboard/latest-invoices';
|
||||||
|
import { lusitana } from '@/app/ui/fonts';
|
||||||
|
import { fetchCardData } from '@/app/lib/data';
|
||||||
|
import { Suspense } from 'react';
|
||||||
|
import CardWrapper from '@/app/ui/dashboard/cards';
|
||||||
|
import {
|
||||||
|
RevenueChartSkeleton,
|
||||||
|
LatestInvoicesSkeleton,
|
||||||
|
CardsSkeleton,
|
||||||
|
} from '@/app/ui/skeletons';
|
||||||
|
|
||||||
|
export default async function Page() {
|
||||||
|
const {
|
||||||
|
numberOfInvoices,
|
||||||
|
numberOfCustomers,
|
||||||
|
totalPaidInvoices,
|
||||||
|
totalPendingInvoices,
|
||||||
|
} = await fetchCardData();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<main>
|
||||||
|
<h1 className={`${lusitana.className} mb-4 text-xl md:text-2xl`}>
|
||||||
|
Dashboard
|
||||||
|
</h1>
|
||||||
|
<div className="grid gap-6 sm:grid-cols-2 lg:grid-cols-4">
|
||||||
|
<Suspense fallback={<CardsSkeleton />}>
|
||||||
|
<CardWrapper />
|
||||||
|
</Suspense>
|
||||||
|
</div>
|
||||||
|
<div className="mt-6 grid grid-cols-1 gap-6 md:grid-cols-4 lg:grid-cols-8">
|
||||||
|
<Suspense fallback={<RevenueChartSkeleton />}>
|
||||||
|
<RevenueChart />
|
||||||
|
</Suspense>
|
||||||
|
<Suspense fallback={<LatestInvoicesSkeleton />}>
|
||||||
|
<LatestInvoices />
|
||||||
|
</Suspense>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
import Link from 'next/link';
|
||||||
|
import { FaceFrownIcon } from '@heroicons/react/24/outline';
|
||||||
|
|
||||||
|
export default function NotFound() {
|
||||||
|
return (
|
||||||
|
<main className="flex h-full flex-col items-center justify-center gap-2">
|
||||||
|
<FaceFrownIcon className="w-10 text-gray-400" />
|
||||||
|
<h2 className="text-xl font-semibold">404 Not Found</h2>
|
||||||
|
<p>Could not find the requested invoice.</p>
|
||||||
|
<Link
|
||||||
|
href="/dashboard/invoices"
|
||||||
|
className="mt-4 rounded-md bg-blue-500 px-4 py-2 text-sm text-white transition-colors hover:bg-blue-400"
|
||||||
|
>
|
||||||
|
Go Back
|
||||||
|
</Link>
|
||||||
|
</main>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import Form from '@/app/ui/invoices/edit-form';
|
||||||
|
import Breadcrumbs from '@/app/ui/invoices/breadcrumbs';
|
||||||
|
import { fetchInvoiceById, fetchCustomers } from '@/app/lib/data';
|
||||||
|
import { notFound } from 'next/navigation';
|
||||||
|
|
||||||
|
export default async function Page(props: { params: Promise<{ id: string }> }) {
|
||||||
|
const params = await props.params;
|
||||||
|
const id = params.id;
|
||||||
|
const [invoice, customers] = await Promise.all([
|
||||||
|
fetchInvoiceById(id),
|
||||||
|
fetchCustomers(),
|
||||||
|
]);
|
||||||
|
|
||||||
|
if (!invoice) {
|
||||||
|
notFound();
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<main>
|
||||||
|
<Breadcrumbs
|
||||||
|
breadcrumbs={[
|
||||||
|
{ label: 'Invoices', href: '/dashboard/invoices' },
|
||||||
|
{
|
||||||
|
label: 'Edit Invoice',
|
||||||
|
href: `/dashboard/invoices/${id}/edit`,
|
||||||
|
active: true,
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
<Form invoice={invoice} customers={customers} />
|
||||||
|
</main>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import Form from '@/app/ui/invoices/create-form';
|
||||||
|
import Breadcrumbs from '@/app/ui/invoices/breadcrumbs';
|
||||||
|
import { fetchCustomers } from '@/app/lib/data';
|
||||||
|
|
||||||
|
export default async function Page() {
|
||||||
|
const customers = await fetchCustomers();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<main>
|
||||||
|
<Breadcrumbs
|
||||||
|
breadcrumbs={[
|
||||||
|
{ label: 'Invoices', href: '/dashboard/invoices' },
|
||||||
|
{
|
||||||
|
label: 'Create Invoice',
|
||||||
|
href: '/dashboard/invoices/create',
|
||||||
|
active: true,
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
<Form customers={customers} />
|
||||||
|
</main>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import { useEffect } from 'react';
|
||||||
|
|
||||||
|
export default function Error({
|
||||||
|
error,
|
||||||
|
reset,
|
||||||
|
}: {
|
||||||
|
error: Error & { digest?: string };
|
||||||
|
reset: () => void;
|
||||||
|
}) {
|
||||||
|
useEffect(() => {
|
||||||
|
// Optionally log the error to an error reporting service
|
||||||
|
console.error(error);
|
||||||
|
}, [error]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<main className="flex h-full flex-col items-center justify-center">
|
||||||
|
<h2 className="text-center">Something went wrong!</h2>
|
||||||
|
<button
|
||||||
|
className="mt-4 rounded-md bg-blue-500 px-4 py-2 text-sm text-white transition-colors hover:bg-blue-400"
|
||||||
|
onClick={
|
||||||
|
// Attempt to recover by trying to re-render the invoices route
|
||||||
|
() => reset()
|
||||||
|
}
|
||||||
|
>
|
||||||
|
Try again
|
||||||
|
</button>
|
||||||
|
</main>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,135 @@
|
|||||||
|
'use server';
|
||||||
|
|
||||||
|
import { z } from 'zod';
|
||||||
|
import { revalidatePath } from 'next/cache';
|
||||||
|
import { redirect } from 'next/navigation';
|
||||||
|
import postgres from 'postgres';
|
||||||
|
import { signIn } from '@/auth';
|
||||||
|
import { AuthError } from 'next-auth';
|
||||||
|
|
||||||
|
const sql = postgres(process.env.POSTGRES_URL!, { ssl: 'require' });
|
||||||
|
|
||||||
|
const FormSchema = z.object({
|
||||||
|
id: z.string(),
|
||||||
|
customerId: z.string({
|
||||||
|
invalid_type_error: 'Please select a customer.',
|
||||||
|
}),
|
||||||
|
amount: z.coerce
|
||||||
|
.number()
|
||||||
|
.gt(0, { message: 'Please enter an amount greater than $0.' }),
|
||||||
|
status: z.enum(['pending', 'paid'], {
|
||||||
|
invalid_type_error: 'Please select an invoice status.',
|
||||||
|
}),
|
||||||
|
date: z.string(),
|
||||||
|
});
|
||||||
|
|
||||||
|
const CreateInvoice = FormSchema.omit({ id: true, date: true });
|
||||||
|
|
||||||
|
export type State = {
|
||||||
|
errors?: {
|
||||||
|
customerId?: string[];
|
||||||
|
amount?: string[];
|
||||||
|
status?: string[];
|
||||||
|
};
|
||||||
|
message?: string | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
export async function createInvoice(prevState: State, formData: FormData) {
|
||||||
|
// Validate form using Zod
|
||||||
|
const validatedFields = CreateInvoice.safeParse({
|
||||||
|
customerId: formData.get('customerId'),
|
||||||
|
amount: formData.get('amount'),
|
||||||
|
status: formData.get('status'),
|
||||||
|
});
|
||||||
|
|
||||||
|
// If form validation fails, return errors early. Otherwise, continue.
|
||||||
|
if (!validatedFields.success) {
|
||||||
|
return {
|
||||||
|
errors: validatedFields.error.flatten().fieldErrors,
|
||||||
|
message: 'Missing Fields. Failed to Create Invoice.',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prepare data for insertion into the database
|
||||||
|
const { customerId, amount, status } = validatedFields.data;
|
||||||
|
const amountInCents = amount * 100;
|
||||||
|
const date = new Date().toISOString().split('T')[0];
|
||||||
|
|
||||||
|
// Insert data into the database
|
||||||
|
try {
|
||||||
|
await sql`
|
||||||
|
INSERT INTO invoices (customer_id, amount, status, date)
|
||||||
|
VALUES (${customerId}, ${amountInCents}, ${status}, ${date})
|
||||||
|
`;
|
||||||
|
} catch (error) {
|
||||||
|
// If a database error occurs, return a more specific error.
|
||||||
|
return {
|
||||||
|
message: 'Database Error: Failed to Create Invoice.',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Revalidate the cache for the invoices page and redirect the user.
|
||||||
|
revalidatePath('/dashboard/invoices');
|
||||||
|
redirect('/dashboard/invoices');
|
||||||
|
}
|
||||||
|
|
||||||
|
const UpdateInvoice = FormSchema.omit({ id: true, date: true });
|
||||||
|
|
||||||
|
export async function updateInvoice(
|
||||||
|
id: string,
|
||||||
|
prevState: State,
|
||||||
|
formData: FormData,
|
||||||
|
) {
|
||||||
|
const validatedFields = UpdateInvoice.safeParse({
|
||||||
|
customerId: formData.get('customerId'),
|
||||||
|
amount: formData.get('amount'),
|
||||||
|
status: formData.get('status'),
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!validatedFields.success) {
|
||||||
|
return {
|
||||||
|
errors: validatedFields.error.flatten().fieldErrors,
|
||||||
|
message: 'Missing Fields. Failed to Update Invoice.',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const { customerId, amount, status } = validatedFields.data;
|
||||||
|
const amountInCents = amount * 100;
|
||||||
|
|
||||||
|
try {
|
||||||
|
await sql`
|
||||||
|
UPDATE invoices
|
||||||
|
SET customer_id = ${customerId}, amount = ${amountInCents}, status = ${status}
|
||||||
|
WHERE id = ${id}
|
||||||
|
`;
|
||||||
|
} catch (error) {
|
||||||
|
return { message: 'Database Error: Failed to Update Invoice.' };
|
||||||
|
}
|
||||||
|
|
||||||
|
revalidatePath('/dashboard/invoices');
|
||||||
|
redirect('/dashboard/invoices');
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function deleteInvoice(id: string) {
|
||||||
|
await sql`DELETE FROM invoices WHERE id = ${id}`;
|
||||||
|
revalidatePath('/dashboard/invoices');
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function authenticate(
|
||||||
|
prevState: string | undefined,
|
||||||
|
formData: FormData,
|
||||||
|
) {
|
||||||
|
try {
|
||||||
|
await signIn('credentials', formData);
|
||||||
|
} catch (error) {
|
||||||
|
if (error instanceof AuthError) {
|
||||||
|
switch (error.type) {
|
||||||
|
case 'CredentialsSignin':
|
||||||
|
return 'Invalid credentials.';
|
||||||
|
default:
|
||||||
|
return 'Something went wrong.';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
import AcmeLogo from '@/app/ui/acme-logo';
|
||||||
|
import LoginForm from '@/app/ui/login-form';
|
||||||
|
import { Suspense } from 'react';
|
||||||
|
|
||||||
|
export default function LoginPage() {
|
||||||
|
return (
|
||||||
|
<main className="flex items-center justify-center md:h-screen">
|
||||||
|
<div className="relative mx-auto flex w-full max-w-[400px] flex-col space-y-2.5 p-4 md:-mt-32">
|
||||||
|
<div className="flex h-20 w-full items-end rounded-lg bg-blue-500 p-3 md:h-36">
|
||||||
|
<div className="w-32 text-white md:w-36">
|
||||||
|
<AcmeLogo />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<Suspense>
|
||||||
|
<LoginForm />
|
||||||
|
</Suspense>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@ import Link from 'next/link';
|
|||||||
import NavLinks from '@/app/ui/dashboard/nav-links';
|
import NavLinks from '@/app/ui/dashboard/nav-links';
|
||||||
import AcmeLogo from '@/app/ui/acme-logo';
|
import AcmeLogo from '@/app/ui/acme-logo';
|
||||||
import { PowerIcon } from '@heroicons/react/24/outline';
|
import { PowerIcon } from '@heroicons/react/24/outline';
|
||||||
|
import { signOut } from '@/auth';
|
||||||
|
|
||||||
export default function SideNav() {
|
export default function SideNav() {
|
||||||
return (
|
return (
|
||||||
@@ -17,7 +18,12 @@ export default function SideNav() {
|
|||||||
<div className="flex grow flex-row justify-between space-x-2 md:flex-col md:space-x-0 md:space-y-2">
|
<div className="flex grow flex-row justify-between space-x-2 md:flex-col md:space-x-0 md:space-y-2">
|
||||||
<NavLinks />
|
<NavLinks />
|
||||||
<div className="hidden h-auto w-full grow rounded-md bg-gray-50 md:block"></div>
|
<div className="hidden h-auto w-full grow rounded-md bg-gray-50 md:block"></div>
|
||||||
<form>
|
<form
|
||||||
|
action={async () => {
|
||||||
|
'use server';
|
||||||
|
await signOut({ redirectTo: '/' });
|
||||||
|
}}
|
||||||
|
>
|
||||||
<button className="flex h-[48px] grow items-center justify-center gap-2 rounded-md bg-gray-50 p-3 text-sm font-medium hover:bg-sky-100 hover:text-blue-600 md:flex-none md:justify-start md:p-2 md:px-3">
|
<button className="flex h-[48px] grow items-center justify-center gap-2 rounded-md bg-gray-50 p-3 text-sm font-medium hover:bg-sky-100 hover:text-blue-600 md:flex-none md:justify-start md:p-2 md:px-3">
|
||||||
<PowerIcon className="w-6" />
|
<PowerIcon className="w-6" />
|
||||||
<div className="hidden md:block">Sign Out</div>
|
<div className="hidden md:block">Sign Out</div>
|
||||||
|
|||||||
+29
-13
@@ -1,3 +1,5 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
import { lusitana } from '@/app/ui/fonts';
|
import { lusitana } from '@/app/ui/fonts';
|
||||||
import {
|
import {
|
||||||
AtSymbolIcon,
|
AtSymbolIcon,
|
||||||
@@ -5,11 +7,21 @@ import {
|
|||||||
ExclamationCircleIcon,
|
ExclamationCircleIcon,
|
||||||
} from '@heroicons/react/24/outline';
|
} from '@heroicons/react/24/outline';
|
||||||
import { ArrowRightIcon } from '@heroicons/react/20/solid';
|
import { ArrowRightIcon } from '@heroicons/react/20/solid';
|
||||||
import { Button } from './button';
|
import { Button } from '@/app/ui/button';
|
||||||
|
import { useActionState } from 'react';
|
||||||
|
import { authenticate } from '@/app/lib/actions';
|
||||||
|
import { useSearchParams } from 'next/navigation';
|
||||||
|
|
||||||
export default function LoginForm() {
|
export default function LoginForm() {
|
||||||
|
const searchParams = useSearchParams();
|
||||||
|
const callbackUrl = searchParams.get('callbackUrl') || '/dashboard';
|
||||||
|
const [errorMessage, formAction, isPending] = useActionState(
|
||||||
|
authenticate,
|
||||||
|
undefined,
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<form className="space-y-3">
|
<form action={formAction} className="space-y-3">
|
||||||
<div className="flex-1 rounded-lg bg-gray-50 px-6 pb-4 pt-8">
|
<div className="flex-1 rounded-lg bg-gray-50 px-6 pb-4 pt-8">
|
||||||
<h1 className={`${lusitana.className} mb-3 text-2xl`}>
|
<h1 className={`${lusitana.className} mb-3 text-2xl`}>
|
||||||
Please log in to continue.
|
Please log in to continue.
|
||||||
@@ -55,19 +67,23 @@ export default function LoginForm() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<LoginButton />
|
<input type="hidden" name="redirectTo" value={callbackUrl} />
|
||||||
<div className="flex h-8 items-end space-x-1">
|
<Button className="mt-4 w-full" aria-disabled={isPending}>
|
||||||
{/* Add form errors here */}
|
Log in <ArrowRightIcon className="ml-auto h-5 w-5 text-gray-50" />
|
||||||
|
</Button>
|
||||||
|
<div
|
||||||
|
className="flex h-8 items-end space-x-1"
|
||||||
|
aria-live="polite"
|
||||||
|
aria-atomic="true"
|
||||||
|
>
|
||||||
|
{errorMessage && (
|
||||||
|
<>
|
||||||
|
<ExclamationCircleIcon className="h-5 w-5 text-red-500" />
|
||||||
|
<p className="text-sm text-red-500">{errorMessage}</p>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function LoginButton() {
|
|
||||||
return (
|
|
||||||
<Button className="mt-4 w-full">
|
|
||||||
Log in <ArrowRightIcon className="ml-auto h-5 w-5 text-gray-50" />
|
|
||||||
</Button>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import type { NextAuthConfig } from 'next-auth';
|
||||||
|
|
||||||
|
export const authConfig = {
|
||||||
|
pages: {
|
||||||
|
signIn: '/login',
|
||||||
|
},
|
||||||
|
callbacks: {
|
||||||
|
authorized({ auth, request: { nextUrl } }) {
|
||||||
|
const isLoggedIn = !!auth?.user;
|
||||||
|
const isOnDashboard = nextUrl.pathname.startsWith('/dashboard');
|
||||||
|
if (isOnDashboard) {
|
||||||
|
if (isLoggedIn) return true;
|
||||||
|
return false; // Redirect unauthenticated users to login page
|
||||||
|
} else if (isLoggedIn) {
|
||||||
|
return Response.redirect(new URL('/dashboard', nextUrl));
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
providers: [], // Add providers with an empty array for now
|
||||||
|
} satisfies NextAuthConfig;
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
import NextAuth from 'next-auth';
|
||||||
|
import Credentials from 'next-auth/providers/credentials';
|
||||||
|
import { authConfig } from './auth.config';
|
||||||
|
import { z } from 'zod';
|
||||||
|
import type { User } from '@/app/lib/definitions';
|
||||||
|
import bcrypt from 'bcrypt';
|
||||||
|
import postgres from 'postgres';
|
||||||
|
|
||||||
|
const sql = postgres(process.env.POSTGRES_URL!, { ssl: 'require' });
|
||||||
|
|
||||||
|
async function getUser(email: string): Promise<User | undefined> {
|
||||||
|
try {
|
||||||
|
const user = await sql<User[]>`SELECT * FROM users WHERE email=${email}`;
|
||||||
|
return user[0];
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Failed to fetch user:', error);
|
||||||
|
throw new Error('Failed to fetch user.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export const { auth, signIn, signOut } = NextAuth({
|
||||||
|
...authConfig,
|
||||||
|
providers: [
|
||||||
|
Credentials({
|
||||||
|
async authorize(credentials) {
|
||||||
|
const parsedCredentials = z
|
||||||
|
.object({ email: z.string().email(), password: z.string().min(6) })
|
||||||
|
.safeParse(credentials);
|
||||||
|
|
||||||
|
if (parsedCredentials.success) {
|
||||||
|
const { email, password } = parsedCredentials.data;
|
||||||
|
const user = await getUser(email);
|
||||||
|
if (!user) return null;
|
||||||
|
const passwordsMatch = await bcrypt.compare(password, user.password);
|
||||||
|
|
||||||
|
if (passwordsMatch) return user;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('Invalid credentials');
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
});
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
import { defineConfig, globalIgnores } from 'eslint/config';
|
||||||
|
import nextVitals from 'eslint-config-next/core-web-vitals';
|
||||||
|
|
||||||
|
const eslintConfig = defineConfig([
|
||||||
|
...nextVitals,
|
||||||
|
// Override default ignores of eslint-config-next.
|
||||||
|
globalIgnores([
|
||||||
|
// Default ignores of eslint-config-next:
|
||||||
|
'.next/**',
|
||||||
|
'out/**',
|
||||||
|
'build/**',
|
||||||
|
'next-env.d.ts',
|
||||||
|
]),
|
||||||
|
{
|
||||||
|
settings: {
|
||||||
|
// Fix for ESLint 10+: eslint-plugin-react uses context.getFilename() (legacy API)
|
||||||
|
// which was removed in ESLint 10 flat config. Declaring the version explicitly
|
||||||
|
// prevents the plugin from trying to auto-detect it and failing.
|
||||||
|
react: { version: '19' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
export default eslintConfig;
|
||||||
Generated
+10291
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
|||||||
|
import NextAuth from 'next-auth';
|
||||||
|
import { authConfig } from './auth.config';
|
||||||
|
|
||||||
|
export default NextAuth(authConfig).auth;
|
||||||
|
|
||||||
|
export const config = {
|
||||||
|
// https://nextjs.org/docs/app/api-reference/file-conventions/proxy#matcher
|
||||||
|
matcher: ['/((?!api|_next/static|_next/image|.*\\.png$).*)'],
|
||||||
|
};
|
||||||
+1
-1
@@ -15,7 +15,7 @@
|
|||||||
"moduleResolution": "bundler",
|
"moduleResolution": "bundler",
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"jsx": "preserve",
|
"jsx": "react-jsx",
|
||||||
"incremental": true,
|
"incremental": true,
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user