Skip to content

Commit

Permalink
fix: update cafe brew form imports
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelblijleven committed Oct 23, 2023
1 parent 6e03ff1 commit 36b5fcf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/app/brews/actions/submit-cafe-brew-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import {type User} from "@clerk/nextjs/api";
import {eq} from "drizzle-orm";
import {createInsertSchema} from "drizzle-zod";

import {type Inputs} from "@/app/brews/cafe/components/cafe-brew-form";
import {db} from "@/db";
import {cafeBrews} from "@/db/schema";
import {type CafeBrewInputs} from "@/components/forms/cafe-brew-form/schema";


const insertSchema = createInsertSchema(cafeBrews)

export async function submitCafeBrewForm(values: Partial<Inputs>) {
export async function submitCafeBrewForm(values: Partial<CafeBrewInputs>) {
const user: User | null = await currentUser();

if (!user) {
Expand Down
5 changes: 3 additions & 2 deletions src/app/brews/cafe/[brewId]/edit/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import {currentUser} from "@clerk/nextjs";
import {type User} from "@clerk/nextjs/api";
import {notFound} from "next/navigation";

import {CafeBrewForm, type Inputs} from "@/app/brews/cafe/components/cafe-brew-form";
import {Title} from "@/components/layout/title";
import {getCafeBrewDetails} from "@/lib/db/brews/get-cafe-brew-details";
import {type CafeBrewInputs} from "@/components/forms/cafe-brew-form/schema";
import {CafeBrewForm} from "@/components/forms/cafe-brew-form/form";

export default async function EditCoffeePage({ params }: { params: { brewId: string } }) {
const user: User | null = await currentUser();
Expand All @@ -15,7 +16,7 @@ export default async function EditCoffeePage({ params }: { params: { brewId: str

if (!brew) return notFound();

const values: Inputs = {
const values: CafeBrewInputs = {
publicId: brew.publicId,
type: brew.type,
coffeeVariety: brew.coffeeVariety ?? "",
Expand Down

0 comments on commit 36b5fcf

Please sign in to comment.