@@ -7,23 +7,30 @@ import Image from 'next/image';
77import { districtsData } from '@/data/districts' ;
88import { questsData } from '@/data/quests' ;
99import { supportersData } from '@/data/supporters' ;
10- import type { Quest , QuestGroup } from '@/types' ;
10+ import type { Quest , QuestAction , QuestGroup } from '@/types' ;
1111import cn from 'classnames' ;
1212import { SupporterInfo } from '@/app/map/venue-map/components/SupporterInfo' ;
1313import { executeQuestAction } from '@/utils/quest-actions' ;
1414import { useWalletManager } from '@/hooks/useWalletManager' ;
1515
1616// Quest icons mapping based on action type
17- const getQuestIcon = ( action : string ) => {
18- const iconMap : Record < string , string > = {
17+ const getQuestIcon = ( action : QuestAction ) => {
18+ const iconMap : Record < QuestAction , string > = {
1919 'connect-wallet' : '/images/icons/ticket.svg' ,
20- 'associate-ticket' : '/images/icons/heart-outline .svg' ,
20+ 'associate-ticket' : '/images/icons/ticket .svg' ,
2121 'setup-profile' : '/images/icons/map.svg' ,
22- 'visit-link' : '/images/icons/qrcode-scan .svg' ,
22+ 'visit-link' : '/images/icons/cash-plus .svg' ,
2323 'mini-quiz' : '/images/icons/cash-plus.svg' ,
2424 'verify-payment' : '/images/icons/cash-plus.svg' ,
2525 'claim-poap' : '/images/icons/check-circle.svg' ,
2626 'verify-basename' : '/images/icons/check-circle.svg' ,
27+ 'favorite-schedule' : '/images/icons/heart-outline.svg' ,
28+ 'explore-map' : '/images/icons/map.svg' ,
29+ 'try-qr' : '/images/icons/qrcode-scan.svg' ,
30+ 'verify-ens' : '/images/icons/cash-plus.svg' ,
31+ todo : '/images/icons/default-quest.svg' ,
32+ 'verify-balance' : '/images/icons/cash-plus.svg' ,
33+ '' : '/images/icons/default-quest.svg' ,
2734 } ;
2835
2936 return iconMap [ action ] || '/images/icons/default-quest.svg' ;
@@ -440,6 +447,17 @@ export default function AppShowcaseDetail({
440447 userAddresses
441448 ) ;
442449
450+ // For groupId 1 (Setup & app tour), also open links if conditionValues is a URL or path
451+ if ( quest . conditionType === 'isLinkVisited' && quest . conditionValues ) {
452+ if ( quest . conditionValues . startsWith ( 'http' ) ) {
453+ // Open external link in new tab
454+ window . open ( quest . conditionValues , '_blank' , 'noopener,noreferrer' ) ;
455+ } else if ( quest . conditionValues . startsWith ( '/' ) ) {
456+ // Navigate to internal route
457+ router . push ( quest . conditionValues ) ;
458+ }
459+ }
460+
443461 if ( isCompleted ) {
444462 // Update quest status to completed if the action was successful
445463 updateQuestStatus ( quest . id . toString ( ) , 'completed' , false ) ;
@@ -621,7 +639,7 @@ export default function AppShowcaseDetail({
621639 style = { { width : `${ overallProgress . percentage } %` } }
622640 />
623641 { /* Milestone markers */ }
624- { [ 5 , 10 , 15 , 20 , 40 , 60 ] . map ( ( milestone , index ) => {
642+ { [ 10 , 30 , 50 , 83 ] . map ( ( milestone , index ) => {
625643 // Only show milestone if it's less than or equal to the total quests
626644 if ( milestone <= overallProgress . total ) {
627645 const isCompleted = overallProgress . completed >= milestone ;
0 commit comments