add rate feature to orders page & enhance menu page

This commit is contained in:
2025-12-30 01:22:49 +03:00
parent 0edd13f2fb
commit a64f92d1fd
10 changed files with 218 additions and 33 deletions

View File

@@ -18,7 +18,7 @@ export function RateBottomSheet({
}: {
isOpen: boolean;
onClose: () => void;
orderIdProp: string;
orderIdProp?: string | undefined;
}) {
const { t } = useTranslation();
const [rating, setRating] = useState<number>(0);
@@ -34,7 +34,7 @@ export function RateBottomSheet({
onClose();
if (getUserDetails?.id) {
rateOrder({
orderID: orderId || orderIdProp,
orderID: orderId || orderIdProp || "",
rating: rating,
comment: "This is a test comment",
userID: getUserDetails?.id.toString() || "",