blog page bug fixed

This commit was merged in pull request #722.
This commit is contained in:
victorAnumudu
2024-05-20 17:51:13 +01:00
parent 5634c1542b
commit 4f69786f19
4 changed files with 18 additions and 8 deletions
+10 -6
View File
@@ -45,7 +45,7 @@ const AccountDashboard = ({ className, bannerList }) => {
{getLowerBanner?.map((props, idx) => {
let image = getImage(props);
let { short_title, short_description, short_button_text, link_path } =
let { short_title, short_description, short_button_text, link_path, card_type, blog_id } =
props;
return (
@@ -56,6 +56,8 @@ const AccountDashboard = ({ className, bannerList }) => {
title={short_title}
desc={short_description}
link_path={link_path}
card_type={card_type}
blog_id={blog_id}
/>
</div>
);
@@ -102,7 +104,9 @@ const TopBanner = ({ image, title = "", desc = "", btn, link_path, key }) => {
);
};
const LowerBanner = ({ image, title = "", desc = "", btn, link_path, key }) => {
const LowerBanner = ({ image, title = "", desc = "", btn, link_path, card_type, blog_id, key }) => {
const newLinkPath = card_type == 'BLOG' ? `${link_path}?blog_id=${blog_id}` : link_path
return (
<div
key={key}
@@ -111,15 +115,15 @@ const LowerBanner = ({ image, title = "", desc = "", btn, link_path, key }) => {
<div className="w-full xxs:flex justify-between items-center border-b border-slate-300 p-2">
<div className="min-h-[150px] sm:min-h-[130px] flex justify-between items-center">
<div className="px-2 flex flex-col gap-2 dark:text-white">
<Link to={link_path} className="text-lg font-bold">
<Link to={newLinkPath} className="text-lg font-bold">
{title}
</Link>
<p to={link_path} className="text-sm">
<p to={newLinkPath} className="text-sm">
{desc}
</p>
</div>
</div>
<Link to={link_path} className="w-[150px] h-[100px]">
<Link to={newLinkPath} className="w-[150px] h-[100px]">
<img
src={image}
alt="banner-img"
@@ -129,7 +133,7 @@ const LowerBanner = ({ image, title = "", desc = "", btn, link_path, key }) => {
</Link>
</div>
<div className="flex justify-between w-full px-2 items-center">
<Link to={link_path} className="text-slate-300 font-semibold text-sm">
<Link to={newLinkPath} className="text-slate-300 font-semibold text-sm">
{btn}
</Link>
<button className="flex items-center justify-center gap-2">