things
This commit is contained in:
parent
e7a552b8ca
commit
6140cb7a6a
|
@ -35,16 +35,13 @@ import {
|
|||
hasCompletedStreakToday,
|
||||
} from 'web/components/profile/betting-streak-modal'
|
||||
import { LoansModal } from './profile/loans-modal'
|
||||
import { useIsMobile } from 'web/hooks/use-is-mobile'
|
||||
|
||||
export function UserPage(props: { user: User }) {
|
||||
const { user } = props
|
||||
const router = useRouter()
|
||||
const currentUser = useUser()
|
||||
const isCurrentUser = user.id === currentUser?.id
|
||||
// const bannerUrl = user.bannerUrl ?? defaultBannerUrl(user.id)
|
||||
const [showConfetti, setShowConfetti] = useState(false)
|
||||
const isMobile = useIsMobile()
|
||||
|
||||
useEffect(() => {
|
||||
const claimedMana = router.query['claimed-mana'] === 'yes'
|
||||
|
@ -113,17 +110,18 @@ export function UserPage(props: { user: User }) {
|
|||
)}
|
||||
{!isCurrentUser && <UserFollowButton userId={user.id} />}
|
||||
</div>
|
||||
{!isMobile && (
|
||||
<ProfilePublicStats
|
||||
className="sm:text-md text-greyscale-6 text-sm"
|
||||
className="sm:text-md text-greyscale-6 hidden text-sm md:inline"
|
||||
user={user}
|
||||
/>
|
||||
)}
|
||||
</Col>
|
||||
</Row>
|
||||
<Col className="mx-4 mt-2">
|
||||
<Spacer h={1} />
|
||||
{isMobile && <ProfilePublicStats className="text-sm" user={user} />}
|
||||
<ProfilePublicStats
|
||||
className="text-greyscale-6 text-sm md:hidden"
|
||||
user={user}
|
||||
/>
|
||||
<Spacer h={1} />
|
||||
{user.bio && (
|
||||
<>
|
||||
|
@ -197,6 +195,7 @@ export function UserPage(props: { user: User }) {
|
|||
tabIcon: <FolderIcon className="h-5" />,
|
||||
content: (
|
||||
<>
|
||||
<Spacer h={4} />
|
||||
<PortfolioValueSection userId={user.id} />
|
||||
<Spacer h={4} />
|
||||
<BetsList user={user} />
|
||||
|
@ -207,16 +206,22 @@ export function UserPage(props: { user: User }) {
|
|||
title: 'Markets',
|
||||
tabIcon: <ScaleIcon className="h-5" />,
|
||||
content: (
|
||||
<>
|
||||
<Spacer h={4} />
|
||||
<CreatorContractsList user={currentUser} creator={user} />
|
||||
</>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: 'Comments',
|
||||
tabIcon: <ChatIcon className="h-5" />,
|
||||
content: (
|
||||
<>
|
||||
<Spacer h={4} />
|
||||
<Col>
|
||||
<UserCommentsList user={user} />
|
||||
</Col>
|
||||
</>
|
||||
),
|
||||
},
|
||||
]}
|
||||
|
|
|
@ -176,27 +176,6 @@ export default function ProfilePage(props: {
|
|||
onBlur={updateUsername}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* TODO: Allow users with M$ 2000 of assets to set custom banners */}
|
||||
{/* <EditUserField
|
||||
user={user}
|
||||
field="bannerUrl"
|
||||
label="Banner Url"
|
||||
isEditing={isEditing}
|
||||
/> */}
|
||||
<label className="label">
|
||||
Banner image{' '}
|
||||
<span className="text-sm text-gray-400">Not editable for now</span>
|
||||
</label>
|
||||
<div
|
||||
className="h-32 w-full bg-cover bg-center sm:h-40"
|
||||
style={{
|
||||
backgroundImage: `url(${
|
||||
user.bannerUrl || defaultBannerUrl(user.id)
|
||||
})`,
|
||||
}}
|
||||
/>
|
||||
|
||||
{(
|
||||
[
|
||||
['bio', 'Bio'],
|
||||
|
|
Loading…
Reference in New Issue
Block a user