Skip to content

Commit

Permalink
fix: type error
Browse files Browse the repository at this point in the history
  • Loading branch information
kuroweb committed Nov 8, 2024
1 parent 0736721 commit a1ca5a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion volumes/frontend/api/products.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface GetProductsParams {
// TODO: 後で実装する
}

type GetProducts = {
export type GetProducts = {
products: (Product & {
iosysCrawlSetting: IosysCrawlSetting
janparaCrawlSetting: JanparaCrawlSetting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ import { useUpdateProductModalState } from '../hooks/useUpdateProductModalState'
import CreateProductModal from './create-product-modal/CreateProductModal'
import UpdateProductModal from './update-product-modal/UpdateProductModal'

import type { Product, Category } from '@/api'
import type { Category, GetProducts } from '@/api'

import { destroyProduct } from '@/server-actions/api'

interface Props {
products: Product[]
products: GetProducts['products']
categories: Category[]
}

const ProductsTable = ({ products, categories }: Props) => {
const router = useRouter()
const [_createModal, setCreateModal] = useCreateProductModalState()
const [_updateModal, setUpdateModal] = useUpdateProductModalState()
const [product, setProduct] = useState<Product | undefined>(undefined)
const [product, setProduct] = useState<GetProducts['products'][number] | undefined>(undefined)

const submitDeleteProduct = async (productId: number) => {
const res = await destroyProduct(productId)
Expand Down

0 comments on commit a1ca5a5

Please sign in to comment.