Blog data resources
This commit is contained in:
@@ -13,6 +13,8 @@ import HiddenProductsTab from "./HiddenProductsTab";
|
||||
import OnSaleTab from "./OnSaleTab";
|
||||
import OwnTab from "./OwnTab";
|
||||
|
||||
import BlogTab from "./BlogTab";
|
||||
|
||||
import usersService from "../../services/UsersService";
|
||||
|
||||
export default function Resources() {
|
||||
@@ -26,8 +28,8 @@ export default function Resources() {
|
||||
const tabs = [
|
||||
{
|
||||
id: 1,
|
||||
name: "onsale",
|
||||
content: "On Sale",
|
||||
name: "blog",
|
||||
content: "Blogs",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
@@ -67,8 +69,7 @@ export default function Resources() {
|
||||
const getUserResources = async () => {
|
||||
try {
|
||||
const res = await api.getUserResources();
|
||||
|
||||
// setUserResource(res.data.reminders);
|
||||
setUserResource(res.data.resources);
|
||||
setIsLoading(false)
|
||||
|
||||
}catch(error) {
|
||||
@@ -139,8 +140,8 @@ export default function Resources() {
|
||||
</div>
|
||||
|
||||
<div className="tab-cotainer w-full mb-10">
|
||||
{tab === "onsale" ? (
|
||||
<OnSaleTab products={onSaleProducts} />
|
||||
{tab === "blog" ? (
|
||||
<BlogTab products={onSaleProducts} resources={userResources} />
|
||||
) : tab === "owned" ? (
|
||||
<OwnTab products={ownProducts} />
|
||||
) : tab === "created" ? (
|
||||
|
||||
Reference in New Issue
Block a user