Commit 725602b6 by sneha-khedekar

spacing alignment

1 parent 76a837b1
......@@ -103,14 +103,14 @@ const GuestReviews = ({ activityById }) => {
rating={data.attributes.rating}
starRatedColor="#FFD600" // Set the rated color to yellow
starHoverColor="#ffe20" // Set the hover color to yellow
changeRating={() => { }}
changeRating={() => {}}
numberOfStars={5}
name="rating"
starDimension="20px" // Set star width and height
/>
<div className="review-content">
"{data.attributes.comments.length > 180 ? `${data.attributes.comments.slice(0, 180)}...` : data.attributes.comments}
{data.attributes.comments.length > 180 && (
"{data.attributes?.comments?.length > 180 ? `${data?.attributes?.comments.slice(0, 180)}...` : data?.attributes?.comments}"
{data?.attributes?.comments?.length > 180 && (
<a
onClick={() => {
setreadMoreText(data);
......@@ -128,7 +128,9 @@ const GuestReviews = ({ activityById }) => {
);
})
) : (
<div className="d-flex justify-content-center"><strong>No reviews available</strong></div>
<div className="d-flex justify-content-center">
<strong>No reviews available</strong>
</div>
)}
</Swiper>
</div>
......
......@@ -50,7 +50,6 @@ const Header = () => {
if (endUser) dispatch(getWishlists({ endUser: endUser.id }));
}, [endUser]);
////
// const [isGridViewOpen, setIsGridViewOpen] = useState(false);
const innerBoxRef = useRef(null); // Ref to hold reference to inner-box div
......@@ -62,22 +61,17 @@ const Header = () => {
};
// Function to handle click outside
const handleClickOutside = (event) => {
if (
logoutBkRef.current &&
!logoutBkRef.current.contains(event.target) &&
innerBoxRef.current &&
!innerBoxRef.current.contains(event.target)
) {
const handleClickOutside = event => {
if (logoutBkRef.current && !logoutBkRef.current.contains(event.target) && innerBoxRef.current && !innerBoxRef.current.contains(event.target)) {
setIsGridViewOpen(false); // Close if clicked outside
}
};
// Effect to add click event listener when component mounts
useEffect(() => {
document.addEventListener('mousedown', handleClickOutside);
document.addEventListener("mousedown", handleClickOutside);
return () => {
document.removeEventListener('mousedown', handleClickOutside);
document.removeEventListener("mousedown", handleClickOutside);
};
}, []);
......@@ -93,7 +87,7 @@ const Header = () => {
</Navbar.Brand>
{loadedUser && loadedUser.id ? (
<div className="top-btn hide-on-desktop">
<div className="logout-bk" >
<div className="logout-bk">
<a onClick={toggleGridViewDropdown} className="user-icon">
<span className="image-container user-pic">
<Image layout="fill" priority alt="" className="image img-fluid" src="/images/icons/user.svg" />
......
......@@ -18,35 +18,35 @@ const MyGiftCard = () => {
console.log("endUser", endUser);
console.log("giftCard", giftCard);
const getStatus = (status) => {
const getStatus = status => {
let text;
let color;
switch (status) {
case 'new':
text = 'PENDING';
color = 'warning';
case "new":
text = "PENDING";
color = "warning";
break;
case 'fulfilled':
text = 'APPROVED';
color = 'success';
case "fulfilled":
text = "APPROVED";
color = "success";
break;
case 'rejected':
text = 'REJECTED';
color = 'error';
case "rejected":
text = "REJECTED";
color = "error";
break;
default:
break;
}
return <Tag color={color}>{text.toUpperCase()}</Tag>;
}
};
return (
<Fragment>
<div className="container">
<div className="container min-height-40 ">
<div className="row">
<div className="col-12 col-lg-12 form-container content-wraaper">
<h2 className="px-2 px-lg-0">My Gift Card</h2>
<div className="row">
{giftCard?.length > 0 ?
{giftCard?.length > 0 ? (
<>
{giftCard.map((data, index) => (
<div className="col-12 col-lg-4 col-md-6 px-4 px-lg-3" key={`1${index}`}>
......@@ -74,20 +74,18 @@ const MyGiftCard = () => {
<p className="m-0">${data.attributes.amount}</p>
</div>
{data.attributes.status !== null &&
<div>
{getStatus(data?.attributes?.status)}
</div>
}
{data.attributes.status !== null && <div>{getStatus(data?.attributes?.status)}</div>}
</div>
</div>
</div>
</div>
))}</>
:
))}
</>
) : (
<>
<p className="mb-5">No Item Found</p>
</>}
</>
)}
</div>
</div>
</div>
......
......@@ -352,11 +352,6 @@
resolved "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.2.5.tgz"
integrity sha512-0szyAo8jMCClkjNK0hknjhmAngUppoRekW6OAezbEYwHXN/VNtsXbfzgYOqjKWxEx3OoAzrT3jLwAF0HdX2MEw==
"@next/swc-linux-x64-musl@12.2.5":
version "12.2.5"
resolved "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.2.5.tgz"
integrity sha512-zg/Y6oBar1yVnW6Il1I/08/2ukWtOG6s3acdJdEyIdsCzyQi4RLxbbhkD/EGQyhqBvd3QrC6ZXQEXighQUAZ0g==
"@nodelib/fs.scandir@2.1.5":
version "2.1.5"
resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz"
......@@ -2622,27 +2617,27 @@ glob-parent@~5.1.2:
dependencies:
is-glob "^4.0.1"
glob@^7.1.3, glob@^7.1.4, glob@^7.2.0:
version "7.2.3"
resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz"
integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==
glob@^7.1.3, glob@^7.1.4, glob@7.1.7:
version "7.1.7"
resolved "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz"
integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^3.1.1"
minimatch "^3.0.4"
once "^1.3.0"
path-is-absolute "^1.0.0"
glob@7.1.7:
version "7.1.7"
resolved "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz"
integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==
glob@^7.2.0:
version "7.2.3"
resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz"
integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^3.0.4"
minimatch "^3.1.1"
once "^1.3.0"
path-is-absolute "^1.0.0"
......@@ -3696,21 +3691,16 @@ move-concurrently@^1.0.1:
rimraf "^2.5.4"
run-queue "^1.0.3"
ms@^2.1.1:
version "2.1.3"
resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
ms@^2.1.1, ms@2.1.2:
version "2.1.2"
resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
ms@2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==
ms@2.1.2:
version "2.1.2"
resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
nanoclone@^0.2.1:
version "0.2.1"
resolved "https://registry.npmjs.org/nanoclone/-/nanoclone-0.2.1.tgz"
......@@ -4838,16 +4828,7 @@ react-easy-crop@^5.0.7:
normalize-wheel "^1.0.1"
tslib "^2.0.1"
react-event-listener@^0.6.2:
version "0.6.6"
resolved "https://registry.npmjs.org/react-event-listener/-/react-event-listener-0.6.6.tgz"
integrity sha512-+hCNqfy7o9wvO6UgjqFmBzARJS7qrNoda0VqzvOuioEpoEXKutiKuv92dSz6kP7rYLmyHPyYNLesi5t/aH1gfw==
dependencies:
"@babel/runtime" "^7.2.0"
prop-types "^15.6.0"
warning "^4.0.1"
react-event-listener@^0.6.6:
react-event-listener@^0.6.2, react-event-listener@^0.6.6:
version "0.6.6"
resolved "https://registry.npmjs.org/react-event-listener/-/react-event-listener-0.6.6.tgz"
integrity sha512-+hCNqfy7o9wvO6UgjqFmBzARJS7qrNoda0VqzvOuioEpoEXKutiKuv92dSz6kP7rYLmyHPyYNLesi5t/aH1gfw==
......@@ -5157,7 +5138,7 @@ react-transition-group@^2.5.3:
prop-types "^15.6.2"
react-lifecycles-compat "^3.0.4"
react-transition-group@^4, react-transition-group@4.3.0:
react-transition-group@^4, react-transition-group@^4.3.0, react-transition-group@4.3.0:
version "4.3.0"
resolved "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.3.0.tgz"
integrity sha512-1qRV1ZuVSdxPlPf4O8t7inxUGpdyO5zG9IoNfJxSO0ImU2A1YWkEQvFPuIPZmMLkg5hYs7vv5mMOyfgSkvAwvw==
......@@ -5167,7 +5148,7 @@ react-transition-group@^4, react-transition-group@4.3.0:
loose-envify "^1.4.0"
prop-types "^15.6.2"
react-transition-group@^4.3.0, react-transition-group@^4.4.2:
react-transition-group@^4.4.2:
version "4.4.5"
resolved "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz"
integrity sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==
......@@ -5669,17 +5650,22 @@ source-map-url@^0.4.0:
resolved "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz"
integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==
source-map@^0.5.6:
source-map@^0.5.6, source-map@^0.5.7:
version "0.5.7"
resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz"
integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==
source-map@^0.5.7:
version "0.5.7"
resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz"
integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==
source-map@^0.6.0:
version "0.6.1"
resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
source-map@^0.6.1:
version "0.6.1"
resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
source-map@~0.6.1:
version "0.6.1"
resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!