Blog data

This commit is contained in:
2023-02-11 10:40:35 -05:00
parent 53734807f0
commit b96dea34e9
3 changed files with 10 additions and 10 deletions
+3 -5
View File
@@ -29,7 +29,7 @@ export default function BlogCardStyle({
<div className="owned-by flex space-x-2 items-center">
<div className="owned w-[46px] h-[46px] rounded-full overflow-hidden">
<img
src={localImgLoad(`images/${datas.owner_img}`)}
src={`${datas.meta_value}`}
alt=""
className="w-full h-full"
/>
@@ -48,9 +48,7 @@ export default function BlogCardStyle({
<div
className="w-full h-[236px] p-6 rounded-xl overflow-hidden"
style={{
background: `url(${localImgLoad(
`images/${datas.thumbnil}`
)}) 0% 0% / cover no-repeat`,
background: `url(${datas.meta_value}) 0% 0% / cover no-repeat`,
}}
>
<div className="product-two-options flex justify-between mb-5 relative">
@@ -183,7 +181,7 @@ export default function BlogCardStyle({
{/* title */}
<Link to="/shop-details" className="mb-2.5">
<h1 className="font-bold text-xl tracking-wide line-clamp-1 text-dark-gray dark:text-white capitalize">
{datas.title}
{datas.post_title}
</h1>
</Link>
<div className="flex justify-between">
+6 -4
View File
@@ -4,7 +4,9 @@ import DataIteration from "../Helpers/DataIteration";
import SearchCom from "../Helpers/SearchCom";
import BlogCardStyle from "../Cards/BlogCardStyle";
export default function BlogTab({ className, products }) {
export default function BlogTab({ className, products, resources }) {
// console.log('In blog data -> ',resources);
//debugger;
return (
<>
<div className={`onsale-tab-wrapper w-full ${className || ""}`}>
@@ -42,12 +44,12 @@ export default function BlogTab({ className, products }) {
<div className="content-section w-full-width">
<div className="grid lg:grid-cols-3 sm:grid-cols-2 grid-cols-1 gap-[30px]">
<DataIteration
datas={products}
datas={resources?.blog}
startLength={0}
endLength={products.length}
endLength={resources.blog!=null?resources.blog.length:0}
>
{({ datas }) => (
<BlogCardStyle key={datas.id} datas={datas} />
<BlogCardStyle key={datas.id} datas={datas} />
)}
</DataIteration>
</div>
+1 -1
View File
@@ -81,7 +81,7 @@ export default function Resources() {
getUserResources();
}, []);
//debugger;
const [tab, setTab] = useState(tabs[0].name);
const tabHandler = (value) => {
setTab(value);