diff --git a/frontend/src/assets/finsafe-logo.png b/frontend/src/assets/finsafe-logo.png index b2ba44b..daf1534 100644 Binary files a/frontend/src/assets/finsafe-logo.png and b/frontend/src/assets/finsafe-logo.png differ diff --git a/frontend/src/components/ConnectWalltet/Walltet.jsx b/frontend/src/components/ConnectWalltet/Walltet.jsx index 1a49e77..72d1e8f 100644 --- a/frontend/src/components/ConnectWalltet/Walltet.jsx +++ b/frontend/src/components/ConnectWalltet/Walltet.jsx @@ -9,20 +9,20 @@ const ConnectWalletButton = ({ return (
{address && !loading ? ( -
Disconnect
) : loading ? (
Loading...
) : ( -
Connect Wallet
diff --git a/frontend/src/components/Navbar.jsx b/frontend/src/components/Navbar.jsx index 8a244ab..7cda238 100644 --- a/frontend/src/components/Navbar.jsx +++ b/frontend/src/components/Navbar.jsx @@ -3,7 +3,7 @@ import React from 'react'; import { AppBar, Toolbar, Typography, InputBase, Button, IconButton } from '@mui/material'; import SearchIcon from '@mui/icons-material/Search'; import { useNavigate } from 'react-router-dom'; - +import { Link } from 'react-router-dom'; // Logo import Logo from "../assets/finsafe-logo.png"; import { useUserStore } from '../store/userStore'; @@ -24,9 +24,11 @@ const Navbar = () => { {/* Logo on the Left */} + - + + {/* Search Bar in the Center */}
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 +