You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
nilabhjaiswal
changed the title
TypeError: params.getValue is not a function - at Object.cellClassName
TypeError: Cannot read properties of undefined (reading 'path')
Jun 30, 2023
import React,{ Fragment, useEffect } from 'react';
import {useDispatch, useSelector } from "react-redux";
import { useAlert } from "react-alert";
import { Link, useMatch } from "react-router-dom";
import { Typography } from "@mui/material";
import "./OrderDetails.css";
import Loader from "../layout/Loader/Loader";
import MetaData from "../layout/MetaData";
import { getOrderDetails, clearErrors } from "../../actions/orderAction";
const OrderDetails = () => {
const { order, error, loading } = useSelector((state) => state.orderDetails);
const match = useMatch();
const dispatch = useDispatch();
const alert = useAlert();
useEffect(() => {
if (error) {
alert.error(error);
dispatch(clearErrors());
}
}, [dispatch, alert, error, match.params.id]);
return (
{loading ? (
) : (
Order #{order && order._id}
Shipping Info
Name:
{order.user && order.user.name}
Phone:
{order.shippingInfo && order.shippingInfo.phoneNo}
Address:
{order.shippingInfo &&
${order.shippingInfo.address}, ${order.shippingInfo.city}, ${order.shippingInfo.state}, ${order.shippingInfo.pinCode}, ${order.shippingInfo.country}
}Payment
<p
className={
order.paymentInfo &&
order.paymentInfo.status === "succeeded"
? "greenColor"
: "redColor"
}
>
{order.paymentInfo &&
order.paymentInfo.status === "succeeded"
? "PAID"
: "NOT PAID"}
)
}
export default OrderDetails
The text was updated successfully, but these errors were encountered: