Build world campaigns rewards and recaps

This commit is contained in:
2026-05-01 11:44:41 +02:00
parent 28e7e46e13
commit 257b0dbef6
100 changed files with 11300 additions and 367 deletions

View File

@@ -1,5 +1,6 @@
import React, { useState, useEffect, useCallback } from 'react'
import { usePage } from '@inertiajs/react'
import SeoHead from '../../components/seo/SeoHead'
import ProfileHero from '../../components/profile/ProfileHero'
import ProfileTabs from '../../components/profile/ProfileTabs'
import TabArtworks from '../../components/profile/tabs/TabArtworks'
@@ -11,9 +12,10 @@ import TabCollections from '../../components/profile/tabs/TabCollections'
import TabActivity from '../../components/profile/tabs/TabActivity'
import TabPosts from '../../components/profile/tabs/TabPosts'
import TabStories from '../../components/profile/tabs/TabStories'
import TabWorlds from '../../components/profile/tabs/TabWorlds'
import GroupProfileSummary from '../../components/groups/GroupProfileSummary'
const VALID_TABS = ['posts', 'artworks', 'stories', 'achievements', 'collections', 'about', 'stats', 'favourites', 'activity']
const VALID_TABS = ['posts', 'artworks', 'stories', 'achievements', 'worlds', 'collections', 'about', 'stats', 'favourites', 'activity']
function getInitialTab(initialTab = 'posts') {
if (typeof window === 'undefined') {
@@ -62,6 +64,8 @@ export default function ProfileShow() {
creatorStories,
collections,
achievements,
worldRewards,
worldHistory,
leaderboardRank,
groupContributionHistory,
journey,
@@ -76,6 +80,7 @@ export default function ProfileShow() {
collectionsFeaturedUrl,
collectionFeatureLimit,
profileTabUrls,
seo,
} = props
const [activeTab, setActiveTab] = useState(() => getInitialTab(initialTab))
@@ -128,7 +133,9 @@ export default function ProfileShow() {
: 'max-w-6xl mx-auto px-4'
return (
<div className="relative min-h-screen overflow-hidden pb-16">
<>
<SeoHead seo={seo} />
<div className="relative min-h-screen overflow-hidden pb-16">
<div
aria-hidden="true"
className="pointer-events-none absolute inset-x-0 top-0 -z-10 h-[34rem] opacity-90"
@@ -208,7 +215,10 @@ export default function ProfileShow() {
/>
)}
{activeTab === 'achievements' && (
<TabAchievements achievements={achievements} />
<TabAchievements achievements={achievements} worldRewards={worldRewards} worldHistory={worldHistory} onTabChange={handleTabChange} />
)}
{activeTab === 'worlds' && (
<TabWorlds worldHistory={worldHistory} isOwner={isOwner} />
)}
{activeTab === 'collections' && (
<TabCollections
@@ -226,6 +236,7 @@ export default function ProfileShow() {
profile={profile}
stats={stats}
achievements={achievements}
worldRewards={worldRewards}
artworks={artworkList}
creatorStories={creatorStories}
profileComments={profileComments}
@@ -264,6 +275,7 @@ export default function ProfileShow() {
/>
)}
</div>
</div>
</div>
</>
)
}