Skip to content

Commit

Permalink
fix typeerror
Browse files Browse the repository at this point in the history
  • Loading branch information
sadmann7 committed Dec 5, 2023
1 parent 1ea3aa8 commit 003d276
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
3 changes: 1 addition & 2 deletions src/components/forms/add-product-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import { toast } from "sonner"
import { type z } from "zod"

import { getSubcategories } from "@/config/products"
import { addProduct } from "@/lib/actions/product"
import { checkProduct } from "@/lib/actions/product"
import { addProduct, checkProduct } from "@/lib/actions/product"
import { catchError, isArrayOfFile } from "@/lib/utils"
import { productSchema } from "@/lib/validations/product"
import { Button } from "@/components/ui/button"
Expand Down
7 changes: 5 additions & 2 deletions src/components/forms/update-product-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ import { toast } from "sonner"
import { type z } from "zod"

import { getSubcategories } from "@/config/products"
import { deleteProduct, updateProduct } from "@/lib/actions/product"
import { checkProduct } from "@/lib/fetchers/product"
import {
checkProduct,
deleteProduct,
updateProduct,
} from "@/lib/actions/product"
import { catchError, isArrayOfFile } from "@/lib/utils"
import { productSchema } from "@/lib/validations/product"
import { Button } from "@/components/ui/button"
Expand Down
13 changes: 1 addition & 12 deletions src/lib/fetchers/product.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
import { unstable_noStore as noStore } from "next/cache"
import { db } from "@/db"
import { products, type Product } from "@/db/schema"
import {
and,
asc,
desc,
eq,
gt,
gte,
inArray,
lt,
lte,
sql,
} from "drizzle-orm"
import { and, asc, desc, eq, gt, gte, inArray, lt, lte, sql } from "drizzle-orm"
import { stores } from "drizzle/schema"
import { z } from "zod"

Expand Down

1 comment on commit 003d276

@vercel
Copy link

@vercel vercel bot commented on 003d276 Dec 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.