Skip to content

Commit 9593ac7

Browse files
committed
remove duplicate create account box
1 parent 438cf9e commit 9593ac7

File tree

2 files changed

+6
-32
lines changed

2 files changed

+6
-32
lines changed

src/components/Home/HomeHistory.tsx

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use client'
22

33
import Icon from '@/components/Global/Icon'
4-
import { Icon as IconComponent } from '@/components/Global/Icons/Icon'
54
import TransactionCard from '@/components/TransactionDetails/TransactionCard'
65
import { mapTransactionDataForDrawer } from '@/components/TransactionDetails/transactionTransformer'
76
import { BASE_URL } from '@/constants'
@@ -17,9 +16,7 @@ import EmptyState from '../Global/EmptyStates/EmptyState'
1716
import { KycStatusItem } from '../Kyc/KycStatusItem'
1817
import { isKycStatusItem, KycHistoryEntry } from '@/hooks/useKycFlow'
1918
import { KYCStatus } from '@/utils'
20-
import { Button } from '../0_Bruddle'
2119
import { useRouter } from 'next/navigation'
22-
import { PeanutGuyGIF } from '@/assets'
2320

2421
/**
2522
* component to display a preview of the most recent transactions on the home page.
@@ -118,31 +115,6 @@ const HomeHistory = ({ isPublic = false, username }: { isPublic?: boolean; usern
118115
)
119116
}, [combinedEntries])
120117

121-
// Show only if it is a guest user
122-
if (!isPublic && !isLoggedIn) {
123-
return (
124-
<div className="relative !mt-40 flex flex-col items-center justify-center">
125-
<img src={PeanutGuyGIF.src} className="absolute -top-26 w-40" alt="Peanut Guy" />
126-
<div className="!mst-40 relative flex flex-col items-center justify-center space-y-4 rounded-sm border-2 border-black bg-white p-4">
127-
<h2 className="font-roboto text-xl font-extrabold">Join Peanut!</h2>
128-
<p className="text-center font-normal">
129-
Send and receive payments in seconds with your own Peanut account.
130-
</p>
131-
132-
<Button
133-
variant="purple"
134-
shadowSize="4"
135-
className="mt-1 flex w-full items-center justify-center gap-2 rounded-sm"
136-
onClick={() => router.push('/setup')}
137-
>
138-
<IconComponent size={16} name="user-plus" fill="black" />
139-
<span className="font-bold">Create Account</span>
140-
</Button>
141-
</div>
142-
</div>
143-
)
144-
}
145-
146118
// show loading state
147119
if (isLoading) {
148120
return (

src/components/Profile/components/PublicProfile.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { useRouter } from 'next/navigation'
1616
import { formatExtendedNumber } from '@/utils'
1717
import Card from '@/components/Global/Card'
1818
import { useAuth } from '@/context/authContext'
19+
import chillPeanutAnim from '@/animations/GIF_ALPHA_BACKGORUND/512X512_ALPHA_GIF_konradurban_01.gif'
1920

2021
interface PublicProfileProps {
2122
username: string
@@ -126,8 +127,8 @@ const PublicProfile: React.FC<PublicProfileProps> = ({
126127
</div>
127128
)}
128129

129-
{/*
130-
{!hasTransactions && (
130+
{/* Show create account box to guest users */}
131+
{!isLoggedIn && (
131132
<div className="relative flex flex-col items-center">
132133
<Card position="single" className="z-10 mt-28 space-y-2 p-4 text-center">
133134
{isLoggedIn ? (
@@ -171,8 +172,9 @@ const PublicProfile: React.FC<PublicProfileProps> = ({
171172
</div>
172173
</div>
173174
)}
174-
*/}
175-
<HomeHistory isPublic={false} username={username} />
175+
176+
{/* Show history to logged in users */}
177+
{isLoggedIn && <HomeHistory isPublic={false} username={username} />}
176178
</div>
177179
</div>
178180
)

0 commit comments

Comments
 (0)