diff --git a/frontend/src/components/PortfolioDetails.jsx b/frontend/src/components/PortfolioDetails.jsx
index fffd51c..d26bd95 100644
--- a/frontend/src/components/PortfolioDetails.jsx
+++ b/frontend/src/components/PortfolioDetails.jsx
@@ -19,9 +19,7 @@ const PortfolioDetails = ({searchId,isActive}) => {
const borrowedDetails = useUserStore((state) => state.borrowedDetails);
const setSuppliedDetails = useUserStore((state) => state.setSuppliedDetails);
const search = useUserStore((state) => state.search);
-
- let userAddress = useUserStore((state) => state.userAddress);
-
+ const [userData,setUserData]=useState({});
const convertSuppliedToDesiredFormat = async (array) => {
try {
const result = await Promise.all(
@@ -78,15 +76,17 @@ const PortfolioDetails = ({searchId,isActive}) => {
const callApis = async () => {
const details = await getPortfolioDetails(searchId);
- const { metadata } = details[0];
+ const { metadata } = details[0];
const { supplied, borrowed } = metadata;
- setLoading(true);
const derivedSupplied = await convertSuppliedToDesiredFormat(supplied);
+ const data=await getPortfolioDetails(searchId);
+ setUserData(data[0]);
const derivedBorrowed = await convertBorrowedToDesiredFormat(borrowed);
setSuppliedDetails(derivedSupplied);
setBorrowedDetails(derivedBorrowed);
- setLoading(false);
};
+ console.log(userData);
+
useEffect(() => {
callApis();
}, [search,searchId]);
diff --git a/frontend/src/pages/ProfilePage.jsx b/frontend/src/pages/ProfilePage.jsx
index e7c92bd..b60b0bd 100644
--- a/frontend/src/pages/ProfilePage.jsx
+++ b/frontend/src/pages/ProfilePage.jsx
@@ -11,6 +11,7 @@ import {Avatars} from '../utils/index'
import Navbar from "../components/Navbar";
import {FeedPage} from "./FeedPage";
import PortfolioDetails from "../components/PortfolioDetails";
+import { useUserStore } from "../store/userStore";
const ProfilePage = () => {
const [currentTab, setCurrentTab] = React.useState(0);
@@ -19,7 +20,9 @@ const ProfilePage = () => {
const handleTabChange = (event, newValue) => {
setCurrentTab(newValue);
};
+ const userData=useUserStore((state) => state.userData);
const searchId=window.location.pathname.split('/')[2];
+ console.log(userData);
return (
<>
@@ -31,6 +34,7 @@ const ProfilePage = () => {
minHeight: "100vh",
paddingTop: "10px",
width: "100vw",
+ marginLeft: "0px",
}}
>
{/* Top Section - User Profile */}
@@ -39,7 +43,8 @@ const ProfilePage = () => {
display: "flex",
alignItems: "center",
marginTop: "20px",
- marginLeft: "30px",
+ marginLeft: "55px",
+
}}
>
{
/>
{searchId.slice(0,5)+'...'+searchId.slice(-4)}
- Secured
+ Secured
+