11import Navbar from "@/components/Navbar" ;
22import ContributorsChart from "@/components/charts/ContributorsChart" ;
33import {
4+ Accordion ,
5+ AccordionButton ,
6+ AccordionIcon ,
7+ AccordionItem ,
8+ AccordionPanel ,
49 Box ,
510 Button ,
611 HStack ,
@@ -156,8 +161,78 @@ export default function Provisions() {
156161 setRender ( true ) ;
157162 } , 2000 ) ;
158163 } , [ ] ) ;
164+ const faqData = [
165+ {
166+ question : "Why do I see zero claimable tokens?" ,
167+ answer :
168+ "Check if you meet the eligibility criteria under Airdrop, CCP, or Early Investors at https://token.hashstack.finance/tokenomics." ,
169+ } ,
170+ {
171+ question : "My wallet address is missing in the JSON provision file!" ,
172+ answer :
173+ "Ensure you’re searching without leading zeros and verify if you qualify under the defined eligibility categories." ,
174+ } ,
175+ {
176+ question :
177+ "I participated in campaigns but don’t see my allocations. Why?" ,
178+ answer :
179+ "Double-check the eligibility criteria (e.g., number of CCP posts or transaction thresholds) on the https://token.hashstack.finance/tokenomics page." ,
180+ } ,
181+ {
182+ question : "Why does my leaderboard rank not match token allocations?" ,
183+ answer :
184+ "Token allocations depend on contribution quality, not just leaderboard rank; refer to the CCP guidelines for more details." ,
185+ } ,
186+ {
187+ question : "Where can I trade HSTK tokens now?" ,
188+ answer :
189+ "HSTK is live on Uniswap and Ekubo. You can trade or swap your tokens their" ,
190+ } ,
191+ {
192+ question : "Can we get a token chart or swap link?" ,
193+ answer :
194+ "Charts and swap links will be updated in announcements shortly; keep an eye on official channels." ,
195+ } ,
196+ {
197+ question : "What are the staking benefits for HSTK?" ,
198+ answer :
199+ " HSTK offers utility for governance, transaction fees, and unlocking features; specific staking benefits will be revealed in future updates." ,
200+ } ,
201+ {
202+ question : "Will HSTK be listed on centralized exchanges?" ,
203+ answer :
204+ "Listings on centralized exchanges are being explored; stay tuned for official announcements." ,
205+ } ,
206+ {
207+ question : "I’m new. How do I get started with Hashstack?" ,
208+ answer :
209+ "Visit https://hashstack.finance for documentation and walkthrough videos to help you get started" ,
210+ } ,
211+ ] ;
212+ const renderAnswer = ( text :string ) => {
213+ const parts = text . split ( / ( h t t p s ? : \/ \/ [ ^ \s ] + ) / g) ; // Split text into parts by URLs
214+ return parts . map ( ( part , index ) => {
215+ if ( part . match ( / h t t p s ? : \/ \/ [ ^ \s ] + / ) ) {
216+ return (
217+ < a
218+ key = { index }
219+ href = { part }
220+ target = "_blank"
221+ rel = "noopener noreferrer"
222+ style = { { color : "#676D9A" , textDecoration :'underline' } } // Optional: Styling for the link
223+ >
224+ { part }
225+ </ a >
226+ ) ;
227+ }
228+ return < span key = { index } > { part } </ span > ;
229+ } ) ;
230+ } ;
159231 const handleSearch = async ( ) => {
160- if ( ( addressInput . length >= 64 && addressInput . length <= 68 ) || ( addressInput . length <= 42 && addressInput . length >= 40 ) ) {
232+ if (
233+ ( addressInput . length >= 64 && addressInput . length <= 68 ) ||
234+ ( addressInput . length <= 42 && addressInput . length >= 40 )
235+ ) {
161236 // setaddressDetails(1);
162237 // setaddressSearched(true);
163238 } else {
@@ -313,7 +388,12 @@ export default function Provisions() {
313388 setprovisionCategories ( updatedCategories ) ;
314389 } ;
315390 useEffect ( ( ) => {
316- if ( ( addressInput . length <= 42 && addressInput . length >= 40 ) && addressAuthenticated && addressL1 ) {
391+ if (
392+ addressInput . length <= 42 &&
393+ addressInput . length >= 40 &&
394+ addressAuthenticated &&
395+ addressL1
396+ ) {
317397 let arr : any = [ ] ;
318398 const fetchData = async ( ) => {
319399 try {
@@ -346,12 +426,19 @@ export default function Provisions() {
346426 } ;
347427
348428 fetchData ( ) ;
349- } else if ( ( addressInput . length >= 64 && addressInput . length <= 68 ) && addressAuthenticated && address ) {
429+ } else if (
430+ addressInput . length >= 64 &&
431+ addressInput . length <= 68 &&
432+ addressAuthenticated &&
433+ address
434+ ) {
350435 let arr : any = [ ] ;
351436 const fetchData = async ( ) => {
352437 try {
353- const res = await getuserbeneficiaryTicketsL2 ( processAddress ( address ) ) ;
354- console . log ( res , 'value' )
438+ const res = await getuserbeneficiaryTicketsL2 (
439+ processAddress ( address )
440+ ) ;
441+ console . log ( res , "value" ) ;
355442 const dataTickets = res ;
356443
357444 for ( let i = 0 ; i < dataTickets . length ; i ++ ) {
@@ -461,9 +548,13 @@ export default function Provisions() {
461548 } , [ loading , address , addressL1 ] ) ;
462549
463550 useEffect ( ( ) => {
464- if ( ( addressInput . length >= 64 && addressInput . length <= 68 ) && address ) {
551+ if ( addressInput . length >= 64 && addressInput . length <= 68 && address ) {
465552 setwalletTypeSelected ( "L2" ) ;
466- } else if ( ( addressInput . length <= 42 && addressInput . length >= 40 ) && addressL1 ) {
553+ } else if (
554+ addressInput . length <= 42 &&
555+ addressInput . length >= 40 &&
556+ addressL1
557+ ) {
467558 setwalletTypeSelected ( "L1" ) ;
468559 } else {
469560 setwalletTypeSelected ( "" ) ;
@@ -550,7 +641,7 @@ export default function Provisions() {
550641 : "5%"
551642 : addressAuthenticated
552643 ? "6%"
553- : "11 %"
644+ : "7 %"
554645 }
555646 left = { isSmallerThan700 ? "4%" : "7%" }
556647 transform = "rotate(120deg)"
@@ -566,7 +657,7 @@ export default function Provisions() {
566657 : "9%"
567658 : addressAuthenticated
568659 ? "11%"
569- : "16 %"
660+ : "13 %"
570661 }
571662 left = { "18%" }
572663 width = "14px"
@@ -583,7 +674,7 @@ export default function Provisions() {
583674 : "5%"
584675 : addressAuthenticated
585676 ? "6%"
586- : "11 %"
677+ : "7 %"
587678 }
588679 right = { isSmallerThan700 ? "5%" : "7%" }
589680 >
@@ -598,7 +689,7 @@ export default function Provisions() {
598689 : "9%"
599690 : addressAuthenticated
600691 ? "11%"
601- : "16 %"
692+ : "13 %"
602693 }
603694 right = "18%"
604695 width = "14px"
@@ -771,8 +862,9 @@ export default function Provisions() {
771862 < Text ml = "0.2rem" > Verifiying</ Text >
772863 </ Box >
773864 )
774- ) : ( addressInput . length >= 64 && addressInput . length <= 68 ) || ( addressInput . length <= 42 && addressInput . length >= 40 ) ? (
775- ( addressInput . length >= 64 && addressInput . length <= 68 ) ? (
865+ ) : ( addressInput . length >= 64 && addressInput . length <= 68 ) ||
866+ ( addressInput . length <= 42 && addressInput . length >= 40 ) ? (
867+ addressInput . length >= 64 && addressInput . length <= 68 ? (
776868 < ConnectStarknetWalletModal
777869 cursor = "pointer"
778870 display = "flex"
@@ -873,6 +965,92 @@ export default function Provisions() {
873965 </ Box >
874966 ) }
875967 < Box width = "100%" mt = "3rem" >
968+ < Box
969+ ml = { isSmallerThan1250 ? "2rem" : "5rem" }
970+ mt = { 8 }
971+ color = "white"
972+ borderRadius = "lg"
973+ >
974+ < Accordion
975+ border = "1px solid #272942"
976+ borderRadius = "6px"
977+ defaultIndex = { [ 0 ] }
978+ allowMultiple
979+ >
980+ < AccordionItem >
981+ < h2 >
982+ < AccordionButton
983+ padding = { isSmallerThan700 ? "16px 22px" : "32px 44px" }
984+ bg = "#0C0C1C"
985+ _hover = { { bg : "#0C0C1C" } }
986+ >
987+ < Box
988+ as = "span"
989+ flex = "1"
990+ textAlign = "left"
991+ fontSize = { isSmallerThan700 ? "20px" : "32px" }
992+ fontWeight = "bold"
993+ >
994+ Frequently Asked Questions
995+ </ Box >
996+ < AccordionIcon />
997+ </ AccordionButton >
998+ </ h2 >
999+ < AccordionPanel pb = { 4 } >
1000+ < Accordion border = "0px" allowMultiple >
1001+ { faqData . map ( ( faq , index ) => (
1002+ < AccordionItem
1003+ padding = "1rem 0rem"
1004+ border = "0px"
1005+ borderBottom = {
1006+ index === faqData . length - 1
1007+ ? "0px"
1008+ : "1px solid #272942"
1009+ }
1010+ key = { index }
1011+ >
1012+ < h2 >
1013+ < AccordionButton >
1014+ < Box
1015+ fontSize = "16px"
1016+ as = "span"
1017+ flex = "1"
1018+ textAlign = "left"
1019+ fontWeight = "400"
1020+ >
1021+ { faq . question }
1022+ </ Box >
1023+ < AccordionIcon />
1024+ </ AccordionButton >
1025+ </ h2 >
1026+ < AccordionPanel pb = { 4 } color = "#676D9A" >
1027+ { renderAnswer ( faq . answer ) }
1028+ </ AccordionPanel >
1029+ </ AccordionItem >
1030+ ) ) }
1031+ </ Accordion >
1032+ </ AccordionPanel >
1033+ </ AccordionItem >
1034+ </ Accordion >
1035+ </ Box >
1036+ < Box ml = { isSmallerThan1250 ? "2rem" : "5rem" } mt = "2rem" >
1037+ < Text fontSize = { isSmallerThan700 ? "20px" : "32px" } >
1038+ Still Facing any issue
1039+ </ Text >
1040+ < Link href = "https://discord.com/invite/VaThqq8vbS" target = "blank" >
1041+ < Text
1042+ mt = "0.5rem"
1043+ fontSize = { isSmallerThan700 ? "14px" : "18px" }
1044+ color = "#00D395"
1045+ cursor = "pointer"
1046+ _hover = { { textDecoration : "underline" } }
1047+ >
1048+ Reach out to us on Discord! --{ ">" }
1049+ </ Text >
1050+ </ Link >
1051+ </ Box >
1052+ </ Box >
1053+ < Box width = "100%" mt = "5rem" >
8761054 < Box ml = { isSmallerThan1250 ? "2rem" : "5rem" } gap = "0" >
8771055 < Box
8781056 display = "flex"
0 commit comments