Skip to content

Commit a9652c6

Browse files
kushagrasarathejjramirezn
authored andcommitted
fix: nav header and pre-alpha banner
1 parent 27ee477 commit a9652c6

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

src/app/(mobile-ui)/history/page.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { useDashboard } from '@/components/Dashboard/useDashboard'
55
import AddressLink from '@/components/Global/AddressLink'
66
import NoDataEmptyState from '@/components/Global/EmptyStates/NoDataEmptyState'
77
import { ListItemView, TransactionType } from '@/components/Global/ListItemView'
8+
import NavHeader from '@/components/Global/NavHeader'
89
import PeanutLoading from '@/components/Global/PeanutLoading'
910
import { TransactionBadge } from '@/components/Global/TransactionBadge'
1011
import { useWallet } from '@/hooks/wallet/useWallet'
@@ -13,6 +14,7 @@ import {
1314
formatAmount,
1415
formatDate,
1516
getChainLogo,
17+
getHeaderTitle,
1618
getHistoryTransactionStatus,
1719
getTokenLogo,
1820
isStableCoin,
@@ -21,12 +23,14 @@ import {
2123
import * as Sentry from '@sentry/nextjs'
2224
import { useInfiniteQuery } from '@tanstack/react-query'
2325
import Link from 'next/link'
26+
import { usePathname } from 'next/navigation'
2427
import { useEffect, useRef, useState } from 'react'
2528
import { isAddress } from 'viem'
2629

2730
const ITEMS_PER_PAGE = 10
2831

2932
const HistoryPage = () => {
33+
const pathname = usePathname()
3034
const { address } = useWallet()
3135
const { composeLinkDataArray, fetchLinkDetailsAsync } = useDashboard()
3236
const [dashboardData, setDashboardData] = useState<IDashboardItem[]>([])
@@ -142,6 +146,7 @@ const HistoryPage = () => {
142146

143147
return (
144148
<div className="mx-auto w-full space-y-6 md:max-w-2xl md:space-y-3">
149+
{!!data?.pages.length ? <NavHeader title={getHeaderTitle(pathname)} /> : null}
145150
<div className="h-full w-full border-t border-n-1">
146151
{!!data?.pages.length &&
147152
data?.pages.map((page, pageIndex) => (

src/app/(mobile-ui)/layout.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33
import { GenericBanner } from '@/components/Global/Banner/GenericBanner'
44
import GuestLoginModal from '@/components/Global/GuestLoginModal'
5-
import NavHeader from '@/components/Global/NavHeader'
65
import TopNavbar from '@/components/Global/TopNavbar'
76
import WalletNavigation from '@/components/Global/WalletNavigation'
87
import HomeWaitlist from '@/components/Home/HomeWaitlist'
98
import { ThemeProvider } from '@/config'
109
import { peanutWalletIsInPreview } from '@/constants'
1110
import { useAuth } from '@/context/authContext'
12-
import { getHeaderTitle } from '@/utils'
1311
import classNames from 'classnames'
1412
import { usePathname } from 'next/navigation'
1513
import { useEffect, useMemo, useState } from 'react'
@@ -45,11 +43,6 @@ const Layout = ({ children }: { children: React.ReactNode }) => {
4543
<div className="flex h-[100dvh] w-full bg-background">
4644
{/* Wrapper div for desktop layout */}
4745
<div className="flex h-full w-full flex-col">
48-
{showNavHeader && showFullPeanutWallet && (
49-
<div className="px-6 py-4 md:hidden">
50-
<NavHeader title={getHeaderTitle(pathName)} />
51-
</div>
52-
)}
5346
{/* Sidebar - Fixed on desktop */}
5447
{showFullPeanutWallet && (
5548
<div className="hidden md:block">
@@ -87,7 +80,7 @@ const Layout = ({ children }: { children: React.ReactNode }) => {
8780
{showFullPeanutWallet ? (
8881
<div
8982
className={twMerge(
90-
'flex min-h-[calc(100dvh-236px)] w-full items-center justify-center md:ml-auto md:min-h-full md:w-[calc(100%-256px)]',
83+
'flex min-h-[calc(100dvh-160px)] w-full items-center justify-center md:ml-auto md:min-h-full md:w-[calc(100%-160px)]',
9184
alignStart && 'items-start',
9285
isSupport && 'h-full'
9386
)}

src/app/(mobile-ui)/wallet/page.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
import { ARBITRUM_ICON } from '@/assets'
44
import { Button, Card } from '@/components/0_Bruddle'
55
import DirectionalActionButtons from '@/components/Global/DirectionalActionButtons'
6+
import DirectSendQr from '@/components/Global/DirectSendQR'
67
import NoDataEmptyState from '@/components/Global/EmptyStates/NoDataEmptyState'
78
import Icon from '@/components/Global/Icon'
89
import { ListItemView } from '@/components/Global/ListItemView'
10+
import NavHeader from '@/components/Global/NavHeader'
911
import { PartnerBarLocation, RewardDetails } from '@/components/Global/RewardsModal'
1012
import { WalletCard } from '@/components/Home/WalletCard'
1113
import { PEANUT_WALLET_CHAIN, PEANUT_WALLET_TOKEN_DECIMALS, PEANUT_WALLET_TOKEN_NAME } from '@/constants'
@@ -14,13 +16,14 @@ import { useWallet } from '@/hooks/wallet/useWallet'
1416
import { useWalletConnection } from '@/hooks/wallet/useWalletConnection'
1517
import { IWallet, WalletProviderType } from '@/interfaces'
1618
import { useWalletStore } from '@/redux/hooks'
17-
import { formatAmount, getChainName, getUserPreferences, updateUserPreferences } from '@/utils'
19+
import { formatAmount, getChainName, getHeaderTitle, getUserPreferences, updateUserPreferences } from '@/utils'
1820
import { useDisconnect } from '@reown/appkit/react'
21+
import { usePathname } from 'next/navigation'
1922
import { useState } from 'react'
2023
import { formatUnits } from 'viem'
21-
import DirectSendQr from '@/components/Global/DirectSendQR'
2224

2325
const WalletDetailsPage = () => {
26+
const pathname = usePathname()
2427
const { disconnect } = useDisconnect()
2528
const { focusedWallet: focusedWalletId } = useWalletStore()
2629
const { connectWallet } = useWalletConnection()
@@ -126,6 +129,10 @@ const WalletDetailsPage = () => {
126129

127130
return (
128131
<div className="mx-auto flex w-full flex-col gap-6 md:max-w-2xl">
132+
<div className="md:hidden">
133+
<NavHeader title={getHeaderTitle(pathname)} />
134+
</div>
135+
129136
<div className="mx-auto">
130137
{focusedWalletId && walletDetails && (
131138
<WalletCard

src/components/Global/MarqueeWrapper/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function MarqueeWrapper({
1818
backgroundColor,
1919
onClick,
2020
direction = 'left',
21-
className = 'border-b-2 border-black border',
21+
className = 'border-b-1 border-black border',
2222
}: MarqueeWrapperProps) {
2323
const baseClass = `${className} ${backgroundColor}`
2424
const _className = onClick ? `${baseClass} cursor-pointer` : baseClass

0 commit comments

Comments
 (0)