Skip to content

Commit abcefa9

Browse files
authored
Merge pull request #27 from devcon-plus-member-platform/Rhea/uiux-revamp-ui-fixes
Rhea/uiux revamp UI fixes
2 parents f28e69b + f178ccd commit abcefa9

8 files changed

Lines changed: 58 additions & 15 deletions

File tree

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ remix-of-devcon-connect/
1919

2020
# AI tool config/cache
2121
.gemini/
22+
.playwright-mcp/
2223
supabase/migrations/.claude/
2324

2425
# Playwright MCP artifacts (screenshots, logs, snapshots)

‎web/src/components/EventCard.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function EventCard({
107107
{isExternal
108108
? externalIsTba
109109
? 'Registration Coming Soon'
110-
: 'Open Registration'
110+
: 'Learn More'
111111
: 'Register Now'}
112112
</div>
113113

‎web/src/components/VolunteerXpCard.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default function VolunteerXpCard() {
1515
const navigate = useNavigate()
1616
const { user } = useAuthStore()
1717
const unreadCount = useNotificationsStore((s) => s.unreadCount)
18-
const { spendablePoints, lifetimePoints, currentTier, tierProgress } = usePointsStore()
18+
const { spendablePoints, currentTier, tierProgress } = usePointsStore()
1919

2020
const [isScrolled, setIsScrolled] = useState(false)
2121

@@ -114,7 +114,7 @@ export default function VolunteerXpCard() {
114114
<BoltOutline color="#94A3B8" size={14} />
115115
</div>
116116
<span className="font-proxima text-[14px] text-slate-500">
117-
{lifetimePoints.toLocaleString()} lifetime points
117+
{spendablePoints.toLocaleString()} spendable points
118118
</span>
119119
</div>
120120

‎web/src/components/XPCard.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { usePointsStore } from '../stores/usePointsStore'
55

66
export default function XPCard() {
77
const navigate = useNavigate()
8-
const { spendablePoints, lifetimePoints, tierProgress } = usePointsStore()
8+
const { spendablePoints, tierProgress } = usePointsStore()
99

1010
return (
1111
<div className="bg-white rounded-2xl shadow-[0px_0px_8px_0px_rgba(0,0,0,0.1)] border border-slate-200 p-[21px] flex flex-col gap-5">
@@ -29,7 +29,7 @@ export default function XPCard() {
2929
<div className="flex items-center gap-2">
3030
<BoltBroken color="#64748B" className="w-4 h-4 shrink-0" />
3131
<span className="font-proxima text-[14px] text-slate-500">
32-
{lifetimePoints.toLocaleString()} lifetime points
32+
{spendablePoints.toLocaleString()} spendable points
3333
</span>
3434
</div>
3535

‎web/src/pages/dashboard/Dashboard.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ useEffect(() => {
122122
title: e.title,
123123
sub: e.location ?? 'DEVCON Philippines',
124124
date: e.event_date ? formatDate.compact(e.event_date) : undefined,
125-
cta: e.is_external ? 'Open Registration' : 'Register Now',
125+
cta: e.is_external ? 'Learn More' : 'Register Now',
126126
image: e.cover_image_url ?? '/photos/devcon-certificate-ceremony.jpg',
127127
isExternal: e.is_external === true,
128128
onClick: () => navigate(`/events/${e.slug}`),

‎web/src/pages/events/EventDetail.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export default function EventDetail() {
216216
onClick={handleExternalRegistration}
217217
className="w-full bg-primary text-white font-bold py-3 rounded-full shadow-sm"
218218
>
219-
Open Registration
219+
Learn More
220220
</button>
221221
)
222222
) : !user ? (

‎web/src/pages/events/EventTicket.tsx‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,28 @@ export default function EventTicket() {
478478
))}
479479
</motion.div>
480480

481+
{/* Missions cross-promo — shown only after successful check-in */}
482+
{checkedIn && (
483+
<motion.div
484+
initial={{ opacity: 0, y: 8 }}
485+
animate={{ opacity: 1, y: 0 }}
486+
transition={{ delay: 0.5, duration: 0.3, ease: 'easeOut' }}
487+
className="mx-4 mb-4 bg-slate-100 rounded-2xl px-4 py-4 flex items-center justify-center gap-2"
488+
>
489+
<BoltOutline color="#F8C630" size={16} />
490+
<p className="text-md3-body-md text-slate-700 font-proxima">
491+
Earn more XP, Go on a{' '}
492+
<button
493+
onClick={() => navigate('/rewards', { state: { tab: 'missions' } })}
494+
className="font-bold underline underline-offset-2"
495+
style={{ color: 'rgb(var(--color-primary))' }}
496+
>
497+
Mission!
498+
</button>
499+
</p>
500+
</motion.div>
501+
)}
502+
481503
{/* Cancel registration — only shown when not yet checked in */}
482504
{!reg.checked_in && !checkedIn && !eventEnded && (
483505
<div className="px-4 pb-5">

‎web/src/pages/rewards/Rewards.tsx‎

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useState, useEffect, useCallback, useRef, useMemo } from 'react'
22
import { toast } from 'sonner'
3-
import { Link, useLocation } from 'react-router-dom'
3+
import { useLocation } from 'react-router-dom'
44
import { useAuthStore } from '../../stores/useAuthStore'
55
import { createPortal } from 'react-dom'
66
import {
@@ -54,11 +54,12 @@ interface RedemptionModalProps {
5454
reward: Reward
5555
spendablePoints: number
5656
onClose: () => void
57+
onGoToMissions: () => void
5758
}
5859

5960
type SheetState = 'confirm' | 'loading' | 'success' | 'error'
6061

61-
function RedemptionModal({ reward, spendablePoints, onClose }: RedemptionModalProps) {
62+
function RedemptionModal({ reward, spendablePoints, onClose, onGoToMissions }: RedemptionModalProps) {
6263
const { redeemReward } = useRewardsStore()
6364
const [sheetState, setSheetState] = useState<SheetState>('confirm')
6465
const [errorMessage, setErrorMessage] = useState<string>('')
@@ -144,13 +145,13 @@ function RedemptionModal({ reward, spendablePoints, onClose }: RedemptionModalPr
144145
</p>
145146
<p className="text-[12px] text-red/80">
146147
You need {(reward.points_cost - spendablePoints).toLocaleString()} more points to redeem this item. Earn more by completing{' '}
147-
<Link
148-
to="/rewards"
148+
<button
149+
onClick={() => { handleClose(); onGoToMissions() }}
149150
className="font-semibold underline underline-offset-2"
150151
style={{ color: 'rgb(var(--color-primary))' }}
151152
>
152153
Missions
153-
</Link>
154+
</button>
154155
!
155156
</p>
156157
</div>
@@ -975,15 +976,18 @@ const TABS = [
975976

976977
export default function Rewards() {
977978
const location = useLocation()
978-
const initialExpandId = (location.state as { expandMissionId?: string } | null)?.expandMissionId
979+
const locationState = location.state as { expandMissionId?: string; tab?: string } | null
980+
const initialExpandId = locationState?.expandMissionId
979981
const { user } = useAuthStore()
980982
const { spendablePoints, loadTotalPoints } = usePointsStore()
981983
const { rewards, allRewards, fetchRewards, isLoading } = useRewardsStore()
982984
const [selectedReward, setSelectedReward] = useState<Reward | null>(null)
983985
const [selectedReceipt, setSelectedReceipt] = useState<RewardRedemption | null>(null)
984986
const [activeTab, setActiveTab] = useState<typeof TABS[number]['id']>('redeem')
985987
const [comingSoonFeature, setComingSoonFeature] = useState<string | null>(null)
986-
const [mainTab, setMainTab] = useState<'redeem' | 'missions'>('missions')
988+
const [mainTab, setMainTab] = useState<'redeem' | 'missions'>(
989+
locationState?.tab === 'missions' ? 'missions' : 'redeem'
990+
)
987991
const [missionFilter, setMissionFilter] = useState<MissionFilterId>('all')
988992

989993
useEffect(() => {
@@ -1065,7 +1069,7 @@ export default function Rewards() {
10651069
{/* ── Segmented Toggle: Missions / Redeem ── */}
10661070
<div className="pt-4 pb-2 px-4 pointer-events-auto">
10671071
<div className="inline-flex w-full gap-2 max-w-4xl mx-auto">
1068-
{(['missions', 'redeem'] as const).map((t) => (
1072+
{(['redeem', 'missions'] as const).map((t) => (
10691073
<button
10701074
key={t}
10711075
onClick={() => setMainTab(t)}
@@ -1150,6 +1154,21 @@ export default function Rewards() {
11501154
))}
11511155
</motion.div>
11521156
)}
1157+
1158+
{/* ── Missions CTA ── */}
1159+
<div className="mt-5 bg-slate-100 rounded-2xl px-4 py-4 flex items-center justify-center gap-2">
1160+
<StarOutline color="#F8C630" size={16} />
1161+
<p className="text-md3-body-md text-slate-700 font-proxima">
1162+
Earn more XP, Go on a{' '}
1163+
<button
1164+
onClick={() => setMainTab('missions')}
1165+
className="font-bold underline underline-offset-2"
1166+
style={{ color: 'rgb(var(--color-primary))' }}
1167+
>
1168+
Mission!
1169+
</button>
1170+
</p>
1171+
</div>
11531172
</>
11541173
) : activeTab === 'receipts' ? (
11551174
<ClaimReceiptsTab onSelectReceipt={setSelectedReceipt} />
@@ -1161,6 +1180,7 @@ export default function Rewards() {
11611180
reward={selectedReward}
11621181
spendablePoints={spendablePoints}
11631182
onClose={handleSheetClose}
1183+
onGoToMissions={() => { handleSheetClose(); setMainTab('missions') }}
11641184
/>
11651185
)}
11661186

0 commit comments

Comments
 (0)