Skip to content

Instantly share code, notes, and snippets.

View melodyclue's full-sized avatar

melodyclue melodyclue

View GitHub Profile
'use client';
import { Controller, useFieldArray, useForm } from 'react-hook-form';
export default function Job() {
const { control } = useForm({
defaultValues: {
emails: [
{
value: '',
@chimame
chimame / context.ts
Created March 17, 2024 11:53
Automatic rollback of vitest using drizzle
import { Client } from "pg";
import { drizzle } from "drizzle-orm/node-postgres";
import * as schema from "../drizzle/schema";
import { Logger } from "drizzle-orm/logger";
export async function createContext() {
const client = new Client({
connectionString: "your database connection string",
});
await client.connect();