From 5f192d79a089b76f4a70af99ad3d56ecadff61d3 Mon Sep 17 00:00:00 2001 From: Anton Cheng Date: Fri, 11 Oct 2024 16:41:34 +0800 Subject: [PATCH 1/5] chore: new way to display positions --- app/home/HomePage.tsx | 5 +- app/layout.tsx | 2 +- app/positions/components/PositionsContent.tsx | 2 +- .../components/PositionsSummaryTable.tsx | 109 ++++++++---------- .../components/SuppliedMarketsDetail.tsx | 104 +++++++++++------ src/components/TokenIcon.tsx | 21 ++++ src/components/layout/header/Navbar.tsx | 8 +- src/hooks/useUserPositions.ts | 18 ++- src/utils/types.ts | 2 + 9 files changed, 164 insertions(+), 107 deletions(-) create mode 100644 src/components/TokenIcon.tsx diff --git a/app/home/HomePage.tsx b/app/home/HomePage.tsx index 3676ad88..aa9c2801 100644 --- a/app/home/HomePage.tsx +++ b/app/home/HomePage.tsx @@ -1,6 +1,7 @@ 'use client'; import React, { useState, useEffect } from 'react'; +import { useAccount } from 'wagmi'; import PrimaryButton from '@/components/common/PrimaryButton'; import Footer from '@/components/layout/footer/Footer'; import backgroundImage from '@/imgs/bg/bg.png'; @@ -16,6 +17,8 @@ export default function HomePage() { return () => clearInterval(interval); }, []); + const { address } = useAccount(); + return (
Why Monarch - View Markets + View Portfolio