Skip to content

Commit d44fb7f

Browse files
committed
refactor(referrals): remove Process Referral Code panel and simplify system
- Remove ProcessReferralCodePanel component completely - Remove referrals Firebase implementation from Account interface - Remove Referral History list from ReferralSystem component - Remove referral-related badges and quests - Simplify referral system to focus on email invitations and social sharing - Clean up UserDropdown component by removing referral panel logic - Update Firebase service to remove referral tracking methods
1 parent aea3c19 commit d44fb7f

26 files changed

Lines changed: 1922 additions & 656 deletions

app/home/page.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import { AccountStatusIndicator } from '@/components/ui/AccountStatusIndicator';
2727
import { Tooltip } from '@/components/ui/Tooltip';
2828
import { LeaderboardSidebar } from '@/components/ui/LeaderboardSidebar';
2929
import { VideoPreloaderScreen } from '@/components/ui/VideoPreloaderScreen';
30+
import { ReferralBonusModal } from '@/components/ui/modals/ReferralBonusModal';
3031
import Image from 'next/image';
3132
// Remove unused nexusCodex import
3233
import { getBadgeById, Account, DemoStats, PREDEFINED_DEMOS } from '@/lib/firebase/firebase-types';
@@ -1003,6 +1004,8 @@ export default function HomePageContent() {
10031004
refreshAccountData,
10041005
isLoading: firebaseLoading,
10051006
isInitialized,
1007+
referralBonusInfo,
1008+
setReferralBonusInfo,
10061009
} = useFirebase();
10071010
const { addToast: addToastHook } = useToast();
10081011
const [activeDemo, setActiveDemo] = useState('hello-milestone');
@@ -1854,6 +1857,17 @@ export default function HomePageContent() {
18541857
onClose={() => setLeaderboardSidebarOpen(false)}
18551858
/>
18561859

1860+
{/* Referral Bonus Modal */}
1861+
{referralBonusInfo && (
1862+
<ReferralBonusModal
1863+
isOpen={referralBonusInfo.showModal}
1864+
onClose={() => setReferralBonusInfo(null)}
1865+
bonusEarned={referralBonusInfo.bonusEarned}
1866+
referrerName={referralBonusInfo.referrerName}
1867+
referralCode={referralBonusInfo.referralCode}
1868+
/>
1869+
)}
1870+
18571871
{/* Toast Container */}
18581872
<ToastContainer />
18591873
</div>

components/ui/LeaderboardSidebar.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ import {
99
} from '@/lib/services/leaderboard-service';
1010
import { Tooltip } from './Tooltip';
1111

12+
// Utility function to format wallet address
13+
const formatWalletAddress = (address: string): string => {
14+
if (!address || address.length < 8) return address;
15+
return `${address.slice(0, 6)}...${address.slice(-4)}`;
16+
};
17+
1218
interface LeaderboardSidebarProps {
1319
isOpen: boolean;
1420
onClose: () => void;
@@ -122,7 +128,7 @@ export const LeaderboardSidebar: React.FC<LeaderboardSidebarProps> = ({ isOpen,
122128
>
123129
<div className='cursor-help'>
124130
<h4 className='font-bold text-white text-sm truncate'>{entry.displayName}</h4>
125-
<p className='text-xs text-gray-400 truncate'>{entry.walletAddress}</p>
131+
<p className='text-xs text-gray-400 truncate'>{formatWalletAddress(entry.walletAddress)}</p>
126132
</div>
127133
</Tooltip>
128134
</div>
@@ -263,7 +269,7 @@ export const LeaderboardSidebar: React.FC<LeaderboardSidebarProps> = ({ isOpen,
263269

264270
const tabs = [
265271
{ id: 'global', label: 'Global', icon: '🌍' },
266-
{ id: 'around', label: 'Around Me', icon: '🎯' },
272+
// { id: 'around', label: 'Around Me', icon: '🎯' },
267273
];
268274

269275
if (!isOpen) {

components/ui/WelcomeScreen.tsx

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
'use client';
2+
3+
import { useState, useEffect } from 'react';
4+
import Image from 'next/image';
5+
6+
interface WelcomeScreenProps {
7+
onStart: () => void;
8+
}
9+
10+
export const WelcomeScreen: React.FC<WelcomeScreenProps> = ({ onStart }) => {
11+
const [isVisible, setIsVisible] = useState(true);
12+
const [isFadingOut, setIsFadingOut] = useState(false);
13+
14+
const handleStart = () => {
15+
setIsFadingOut(true);
16+
setTimeout(() => {
17+
setIsVisible(false);
18+
onStart();
19+
}, 800);
20+
};
21+
22+
if (!isVisible) return null;
23+
24+
return (
25+
<div
26+
className={`
27+
fixed inset-0 z-[9999]
28+
bg-gradient-to-br from-neutral-900 via-brand-900 to-neutral-900
29+
transition-opacity duration-800 ease-in-out
30+
${isFadingOut ? 'opacity-0' : 'opacity-100'}
31+
`}
32+
>
33+
{/* Animated background elements */}
34+
<div className='absolute inset-0 opacity-20 bg-gradient-to-r from-brand-500/10 via-transparent to-accent-500/10'></div>
35+
36+
{/* Floating particles */}
37+
<div className='absolute inset-0 overflow-hidden pointer-events-none'>
38+
{[...Array(30)].map((_, i) => (
39+
<div
40+
key={i}
41+
className='absolute w-1 h-1 bg-white rounded-full animate-twinkle'
42+
style={{
43+
left: `${Math.random() * 100}%`,
44+
top: `${Math.random() * 100}%`,
45+
animationDelay: `${Math.random() * 3}s`,
46+
animationDuration: `${2 + Math.random() * 3}s`,
47+
}}
48+
/>
49+
))}
50+
</div>
51+
52+
{/* Main content */}
53+
<div className='relative z-10 h-full flex flex-col items-center justify-center text-center px-4'>
54+
{/* Logo */}
55+
<div className='mb-8 animate-fadeInUp' style={{ animationDelay: '0.2s' }}>
56+
<Image
57+
src='/images/logo/logoicon.png'
58+
alt='STELLAR NEXUS'
59+
width={200}
60+
height={200}
61+
priority
62+
className='w-48 h-48 md:w-64 md:h-64 drop-shadow-2xl'
63+
/>
64+
</div>
65+
66+
{/* Main Title */}
67+
<h1
68+
className={`
69+
text-4xl md:text-6xl lg:text-7xl font-bold
70+
text-transparent bg-clip-text
71+
bg-gradient-to-r from-brand-400 via-accent-400 to-brand-400
72+
mb-6
73+
animate-fadeInUp
74+
drop-shadow-[0_0_30px_rgba(14,165,233,0.5)]
75+
`}
76+
style={{ animationDelay: '0.4s' }}
77+
>
78+
NEXUS STELLAR
79+
</h1>
80+
81+
{/* Subtitle */}
82+
<p
83+
className={`
84+
text-xl md:text-2xl lg:text-3xl
85+
text-white/90
86+
mb-12
87+
animate-fadeInUp
88+
drop-shadow-[0_2px_10px_rgba(0,0,0,0.8)]
89+
`}
90+
style={{ animationDelay: '0.6s' }}
91+
>
92+
Welcome to the future of Web3
93+
</p>
94+
95+
{/* Start Button */}
96+
<div
97+
className='animate-fadeInUp'
98+
style={{ animationDelay: '0.8s' }}
99+
>
100+
<button
101+
onClick={handleStart}
102+
className={`
103+
relative px-12 py-6 font-bold rounded-xl
104+
transition-all duration-500 transform
105+
shadow-2xl border-2 text-2xl
106+
hover:scale-110 hover:rotate-1
107+
bg-gradient-to-r from-brand-500 via-accent-500 to-brand-600
108+
hover:from-brand-600 hover:via-accent-600 hover:to-brand-700
109+
text-white border-white/30 hover:border-white/60
110+
hover:shadow-brand-500/50
111+
`}
112+
>
113+
{/* Button Content */}
114+
<div className='flex items-center space-x-4'>
115+
<span className='text-2xl font-bold'>START</span>
116+
<span className='text-xl'>🚀</span>
117+
</div>
118+
119+
{/* Hover Effects */}
120+
<div className='absolute inset-0 bg-gradient-to-r from-white/0 via-white/10 to-white/0 rounded-xl opacity-0 hover:opacity-100 transition-opacity duration-300'></div>
121+
122+
{/* Floating particles around button */}
123+
<div className='absolute inset-0 overflow-hidden rounded-xl pointer-events-none'>
124+
<div className='absolute top-2 left-1/4 w-1 h-1 bg-brand-400 rounded-full animate-ping opacity-70'></div>
125+
<div
126+
className='absolute top-4 right-1/3 w-1 h-1 bg-accent-400 rounded-full animate-ping opacity-80'
127+
style={{ animationDelay: '0.5s' }}
128+
></div>
129+
<div
130+
className='absolute bottom-2 left-1/3 w-1 h-1 bg-brand-300 rounded-full animate-ping opacity-60'
131+
style={{ animationDelay: '1s' }}
132+
></div>
133+
<div
134+
className='absolute bottom-4 right-1/4 w-1 h-1 bg-accent-300 rounded-full animate-ping opacity-90'
135+
style={{ animationDelay: '1.5s' }}
136+
></div>
137+
</div>
138+
</button>
139+
</div>
140+
141+
{/* Glowing Ring Animation */}
142+
<div className='absolute inset-0 flex items-center justify-center pointer-events-none'>
143+
<div className='relative w-80 h-80 md:w-96 md:h-96'>
144+
<div className='absolute inset-0 rounded-full border-2 border-brand-400/30 animate-ping' />
145+
<div
146+
className='absolute inset-4 rounded-full border-2 border-accent-400/30 animate-ping'
147+
style={{ animationDelay: '0.5s' }}
148+
/>
149+
<div
150+
className='absolute inset-8 rounded-full border-2 border-brand-300/30 animate-ping'
151+
style={{ animationDelay: '1s' }}
152+
/>
153+
</div>
154+
</div>
155+
</div>
156+
157+
{/* Vignette Effect */}
158+
<div className='absolute inset-0 pointer-events-none bg-[radial-gradient(circle_at_center,_transparent_0%,_rgba(0,0,0,0.4)_100%)]' />
159+
</div>
160+
);
161+
};

0 commit comments

Comments
 (0)