diff --git a/src/components/Cards/BlogCardStyle.jsx b/src/components/Cards/BlogCardStyle.jsx
index 7235414..1958101 100644
--- a/src/components/Cards/BlogCardStyle.jsx
+++ b/src/components/Cards/BlogCardStyle.jsx
@@ -35,9 +35,9 @@ export default function BlogCardStyle({
/>
-
Owned by
+
Published :
- {datas.owner}
+ {datas.post_date}
diff --git a/src/components/Resources/index.jsx b/src/components/Resources/index.jsx
index 35117c4..377ac14 100755
--- a/src/components/Resources/index.jsx
+++ b/src/components/Resources/index.jsx
@@ -25,51 +25,19 @@ export default function Resources() {
const ownProducts = products.datas;
const collectionProducts = collections.data;
- const tabs = [
- {
- id: 1,
- name: "blog",
- content: "Blogs",
- },
- {
- id: 2,
- name: "owned",
- content: "Owned",
- },
- {
- id: 3,
- name: "created",
- content: "Created",
- },
- {
- id: 4,
- name: "hidden",
- content: "Hidden",
- },
- {
- id: 5,
- name: "collection",
- content: "Collection",
- },
- {
- id: 6,
- name: "activity",
- content: "Activity",
- },
- ];
-
const api = new usersService();
-
+ const [tabs, setUserTab] = useState([]);
const [isLoading, setIsLoading] = useState(true)
-
const [userResources, setUserResource] = useState([]);
-
+ const [tab, setTab] = useState(/*tabs[0].name*/ null);
const getUserResources = async () => {
try {
const res = await api.getUserResources();
setUserResource(res.data.resources);
+ setUserTab(res.data.category);
+ setTab(res.data.category[0].name);
setIsLoading(false)
}catch(error) {
@@ -82,7 +50,7 @@ export default function Resources() {
}, []);
//debugger;
- const [tab, setTab] = useState(tabs[0].name);
+
const tabHandler = (value) => {
setTab(value);
};