diff --git a/tsconfig.node.json b/.json similarity index 100% rename from tsconfig.node.json rename to .json diff --git a/src/features/products/components/DeleteProduct.tsx b/src/features/products/components/DeleteProduct.tsx index 61c62c14..8d2bc5cd 100644 --- a/src/features/products/components/DeleteProduct.tsx +++ b/src/features/products/components/DeleteProduct.tsx @@ -24,6 +24,7 @@ export function DeleteProduct({ disabled ? 'bg-red-3 text-red-1' : 'hover:bg-red-6 bg-red-5 text-white ', + 'sm:w-24 md:w-32 lg:w-32 xl:w-32 hidden sm:inline md:inline lg:inline xl:inline', )} disabled={disabled} > diff --git a/src/features/products/components/Product.tsx b/src/features/products/components/Product.tsx index 1025ceca..820e281a 100644 --- a/src/features/products/components/Product.tsx +++ b/src/features/products/components/Product.tsx @@ -11,17 +11,20 @@ interface Props { export function Product({ product, pending, actions }: Props) { return ( <> -
- x{product.quantity} - {product.name} - {product.brand} -
- {actions} + + + + + + + +
+ x{product.quantity} + + {product.name} + + {product.brand} + {actions}
); } diff --git a/src/features/products/components/ProductsList.tsx b/src/features/products/components/ProductsList.tsx index d419dc78..3a7bf0a2 100644 --- a/src/features/products/components/ProductsList.tsx +++ b/src/features/products/components/ProductsList.tsx @@ -2,6 +2,7 @@ import { useMutationState } from '@tanstack/react-query'; import { ProductType, useQueryProducts } from '..'; import { DeleteProduct } from './DeleteProduct'; import { Product } from './Product'; +import { twJoin } from 'tailwind-merge'; export function ProductsList() { const query = useQueryProducts(); @@ -18,20 +19,30 @@ export function ProductsList() { <> {query.isLoading &&

Loading...

} {query.isSuccess && products!.length > 0 && ( - + )} {query.isError &&

Error: {query.error?.message}

}