Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions src/components/Profile/components/PublicProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ import ProfileHeader from './ProfileHeader'
import { useState, useEffect } from 'react'
import { usersApi } from '@/services/users'
import { useRouter } from 'next/navigation'
import { formatExtendedNumber } from '@/utils'
import Card from '@/components/Global/Card'
import { useAuth } from '@/context/authContext'
import chillPeanutAnim from '@/animations/GIF_ALPHA_BACKGORUND/512X512_ALPHA_GIF_konradurban_01.gif'

interface PublicProfileProps {
Expand All @@ -33,9 +31,6 @@ const PublicProfile: React.FC<PublicProfileProps> = ({
}) => {
const dispatch = useAppDispatch()
const [fullName, setFullName] = useState<string>(username)
const [totalSent, setTotalSent] = useState<string>('0.00')
const [totalReceived, setTotalReceived] = useState<string>('0.00')
const { user } = useAuth()
const router = useRouter()

// Handle send button click
Expand All @@ -50,8 +45,6 @@ const PublicProfile: React.FC<PublicProfileProps> = ({
useEffect(() => {
usersApi.getByUsername(username).then((user) => {
if (user?.fullName) setFullName(user.fullName)
setTotalSent(user.totalUsdSent)
setTotalReceived(user.totalUsdReceived)
})
}, [username])

Expand Down Expand Up @@ -107,24 +100,6 @@ const PublicProfile: React.FC<PublicProfileProps> = ({
</Link>
</div>

{!!user && totalSent !== '0.00' && totalReceived !== '0.00' && (
<div className="space-y-6">
<div>
<Card position="first">
<div className="flex items-center justify-between py-2">
<span className="font-medium">Total sent to</span>
<span className="font-medium">${formatExtendedNumber(totalSent)}</span>
</div>
</Card>
<Card position="last">
<div className="flex items-center justify-between py-2">
<span className="font-medium">Total received from</span>
<span className="font-medium">${formatExtendedNumber(totalReceived)}</span>
</div>
</Card>
</div>
</div>
)}
{/* Show create account box to guest users */}
{!isLoggedIn && (
<div className="relative flex flex-col items-center">
Expand Down
Loading