made blog component to show first when resources link is hit
This commit was merged in pull request #235.
This commit is contained in:
@@ -23,10 +23,10 @@ export default function Resources(props) {
|
||||
const __resources = props.MyResourceData;
|
||||
//debugger;
|
||||
// Collection Items
|
||||
const collectionProducts = __resources?.collectiondata?.data;
|
||||
const tab_categories = __resources?.tab_categories?.data;
|
||||
const onSaleProducts = __resources?.marketdata?.data;
|
||||
const CreatedSell = __resources?.marketdata?.data;
|
||||
const tab_categories = __resources?.tab_categories?.data;
|
||||
const collectionProducts = __resources?.collectiondata?.data;
|
||||
const onSaleProducts = __resources?.marketdata?.data;
|
||||
const CreatedBits = __resources?.productdata?.data;
|
||||
const blogItems = __resources?.blogdata?.payload;
|
||||
|
||||
@@ -36,8 +36,6 @@ export default function Resources(props) {
|
||||
setTab(value);
|
||||
};
|
||||
|
||||
console.log("first")
|
||||
|
||||
// Category Components
|
||||
const tabComponents = {
|
||||
blog: <BlogTab blogdata={blogItems} />,
|
||||
@@ -56,7 +54,7 @@ export default function Resources(props) {
|
||||
activity: <ActivitiesTab />,
|
||||
};
|
||||
|
||||
const defaultTabComponent = <OnSaleTab products={onSaleProducts} />;
|
||||
const defaultTabComponent = <BlogTab blogdata={blogItems} />;
|
||||
|
||||
const selectedTabComponent = tabComponents[tab] || defaultTabComponent;
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ export default function BlogTab({ className, blogdata }) {
|
||||
endLength={blogdata?.blogdata.length}
|
||||
>
|
||||
{({ datas }) => (
|
||||
<ResourceBlogCard key={datas.id} datas={datas} />
|
||||
<ResourceBlogCard key={datas.id} datas={datas} bg={blogdata.image_url} />
|
||||
)}
|
||||
</DataIteration>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user