fix: Too many prisma client created

This commit is contained in:
Sonny
2022-05-08 23:34:58 +02:00
parent 42f6f8858e
commit 339b651dfc
14 changed files with 17 additions and 32 deletions

View File

@@ -13,8 +13,7 @@ import styles from '../../styles/create.module.scss';
import { Category } from '../../types';
import { BuildCategory, HandleAxiosError, IsValidURL } from '../../utils/front';
import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();
import { prisma } from '../../utils/back';
function CreateLink({ categories }: { categories: Category[]; }) {
const [name, setName] = useState<string>('');