add react-query

This commit is contained in:
Julien Aldon
2026-02-10 17:21:26 +01:00
parent 7df0af8f1d
commit feea610d09
6 changed files with 53 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
import { Group, NumberInput, Paper, Stack, Text } from "@mantine/core";
import { useCallback, useState, type RefAttributes } from "react";
import { useCallback, useState } from "react";
type Product = {
name: string;
@@ -17,7 +17,6 @@ export type ShipmentCardProps = {
export default function ShipmentCard({title, date, product}: ShipmentCardProps) {
const [ price, setPrice ] = useState<number>(0)
const calculatePrice = useCallback((value: number | string ) => {
const numberValue = Number(value)
const price = numberValue * product.price