From f453f7f098dbccc21c674608c913b55a45086e76 Mon Sep 17 00:00:00 2001 From: Imran Jami Date: Sat, 26 Jul 2025 11:36:25 -0700 Subject: [PATCH 1/3] initial commit --- apps/web/src/pages/Landing/sections/Hero.tsx | 10 ++++++- apps/web/src/pages/Profile/index.tsx | 30 ++++++++++++++++++++ apps/web/src/pages/RouteDefinitions.tsx | 7 +++++ 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 apps/web/src/pages/Profile/index.tsx diff --git a/apps/web/src/pages/Landing/sections/Hero.tsx b/apps/web/src/pages/Landing/sections/Hero.tsx index 0211a5ec39f..9bef5d814ce 100644 --- a/apps/web/src/pages/Landing/sections/Hero.tsx +++ b/apps/web/src/pages/Landing/sections/Hero.tsx @@ -9,7 +9,7 @@ import { ChevronDown } from 'react-feather' import { Trans, useTranslation } from 'react-i18next' import { useNavigate } from 'react-router' import { serializeSwapStateToURLParameters } from 'state/swap/hooks' -import { Flex, Text, useMedia } from 'ui/src' +import { Button, Flex, Text, useMedia } from 'ui/src' import { INTERFACE_NAV_HEIGHT } from 'ui/src/theme' import { useEnabledChains } from 'uniswap/src/features/chains/hooks/useEnabledChains' import { SwapRedirectFn } from 'uniswap/src/features/transactions/components/TransactionModal/TransactionModalContext' @@ -139,6 +139,14 @@ export function Hero({ scrollToRef, transition }: HeroProps) { + + + + + + diff --git a/apps/web/src/pages/Profile/index.tsx b/apps/web/src/pages/Profile/index.tsx new file mode 100644 index 00000000000..4633a913fc7 --- /dev/null +++ b/apps/web/src/pages/Profile/index.tsx @@ -0,0 +1,30 @@ +import { Flex, Text } from 'ui/src' +import { INTERFACE_NAV_HEIGHT } from 'ui/src/theme' + +export default function Profile() { + return ( + + + + Profile Page + + + Welcome to your profile page! This is where you can manage your account settings and preferences. + + + + ) +} \ No newline at end of file diff --git a/apps/web/src/pages/RouteDefinitions.tsx b/apps/web/src/pages/RouteDefinitions.tsx index fd00d60859b..37e189d78d1 100644 --- a/apps/web/src/pages/RouteDefinitions.tsx +++ b/apps/web/src/pages/RouteDefinitions.tsx @@ -40,6 +40,7 @@ const TokenDetails = lazy(() => import('pages/TokenDetails')) const ExtensionPasskeyAuthPopUp = lazy(() => import('pages/ExtensionPasskeyAuthPopUp')) const PasskeyManagement = lazy(() => import('pages/PasskeyManagement')) const ExtensionUninstall = lazy(() => import('pages/ExtensionUninstall/ExtensionUninstall')) +const Profile = lazy(() => import('pages/Profile')) interface RouterConfig { browserRouterEnabled?: boolean @@ -359,6 +360,12 @@ export const routes: RouteDefinition[] = [ getElement: () => , getTitle: () => i18n.t('title.extension.uninstall'), }), + createRouteDefinition({ + path: '/profile', + getElement: () => , + getTitle: () => 'Profile', + getDescription: () => 'Manage your account settings and preferences', + }), createRouteDefinition({ path: '*', getElement: () => }), createRouteDefinition({ path: '/not-found', getElement: () => }), ] From 07da0b97d8cb62e175a3765d7757c203b1e4a2e6 Mon Sep 17 00:00:00 2001 From: Imran Jami Date: Sat, 26 Jul 2025 11:37:14 -0700 Subject: [PATCH 2/3] adding profile page --- apps/web/src/pages/Profile/index.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/apps/web/src/pages/Profile/index.tsx b/apps/web/src/pages/Profile/index.tsx index 4633a913fc7..c3b0ffbdd88 100644 --- a/apps/web/src/pages/Profile/index.tsx +++ b/apps/web/src/pages/Profile/index.tsx @@ -11,13 +11,7 @@ export default function Profile() { pt={INTERFACE_NAV_HEIGHT} px="$spacing20" > - + Profile Page @@ -27,4 +21,4 @@ export default function Profile() { ) -} \ No newline at end of file +} From de8b2a5c36af4f291c0c2a640d63492c0e94fd17 Mon Sep 17 00:00:00 2001 From: Imran Jami Date: Sun, 27 Jul 2025 11:54:45 -0700 Subject: [PATCH 3/3] bring in profile stats & assets --- apps/web/src/pages/Profile/index.tsx | 76 ++++++++++++++++++++++------ 1 file changed, 61 insertions(+), 15 deletions(-) diff --git a/apps/web/src/pages/Profile/index.tsx b/apps/web/src/pages/Profile/index.tsx index c3b0ffbdd88..70f852a3ca2 100644 --- a/apps/web/src/pages/Profile/index.tsx +++ b/apps/web/src/pages/Profile/index.tsx @@ -1,23 +1,69 @@ +import MiniPortfolio from 'components/AccountDrawer/MiniPortfolio/MiniPortfolio' +import { DeltaArrow } from 'components/Tokens/TokenDetails/Delta' +import { useAccount } from 'hooks/useAccount' import { Flex, Text } from 'ui/src' import { INTERFACE_NAV_HEIGHT } from 'ui/src/theme' +import { usePortfolioTotalValue } from 'uniswap/src/features/dataApi/balances' +import { useLocalizationContext } from 'uniswap/src/features/language/LocalizationContext' +import { NumberType } from 'utilities/src/format/types' export default function Profile() { + const account = useAccount() + const { convertFiatAmountFormatted, formatPercent } = useLocalizationContext() + + const { data: portfolioTotalValue, loading: portfolioLoading } = usePortfolioTotalValue({ + address: account.address, + }) + return ( - - - - Profile Page - - - Welcome to your profile page! This is where you can manage your account settings and preferences. - + + + + + Portfolio + + {account.address && ( + + + {portfolioLoading + ? '...' + : portfolioTotalValue?.balanceUSD + ? convertFiatAmountFormatted(portfolioTotalValue.balanceUSD, NumberType.PortfolioBalance) + : '$0.00'} + + {portfolioTotalValue?.percentChange && ( + + + = 0 ? '$statusSuccess' : '$statusCritical'} + > + {formatPercent(Math.abs(portfolioTotalValue.percentChange))} (24h) + + + )} + + )} + + {account.address ? ( + + ) : ( + + Connect your wallet to view your portfolio + + )} )