@@ -3,6 +3,8 @@ import Button, { SecondaryButton } from './Button'
33import { useEffect , useState } from 'react'
44import { useRouter } from 'next/router'
55
6+ const V2_PROMO_DISMISSED_KEY = 'v2-promo-dismissed'
7+
68const TermsPopupModal = ( ) => {
79 const [ openModal , setOpenModal ] = useState ( true )
810 const [ isClient , setIsClient ] = useState ( false )
@@ -25,8 +27,16 @@ const TermsPopupModal = () => {
2527 }
2628 } )
2729
28- const acceptTerms = ( ) => {
30+ const acceptAndGoToV2 = ( ) => {
31+ localStorage . setItem ( 'accept-terms' , 'true' )
32+ localStorage . setItem ( V2_PROMO_DISMISSED_KEY , 'true' )
33+ window . open ( 'https://v2.realms.today' , '_blank' )
34+ setOpenModal ( false )
35+ }
36+
37+ const acceptAndStay = ( ) => {
2938 localStorage . setItem ( 'accept-terms' , 'true' )
39+ localStorage . setItem ( V2_PROMO_DISMISSED_KEY , 'true' )
3040 setOpenModal ( false )
3141 }
3242
@@ -43,18 +53,87 @@ const TermsPopupModal = () => {
4353 onClose = { ( ) => setOpenModal ( false ) }
4454 bgClickClose = { false }
4555 hideClose = { true }
56+ sizeClassName = "sm:max-w-lg"
4657 >
47- < p className = "text-justify" >
48- The operating entity of this site and owner of the related
49- intellectual property has changed. The new operator is Realms Today
50- Ltd. (the New Operator). We have accordingly amended the Terms and
51- the Private Policy governing the relationship between our users and
52- the New Operator. By clicking "accept", you represent and warrant
53- that you agree to the revised Terms and Private Policy.
54- </ p >
55- < div className = "flex gap-4 mt-4 justify-center" >
56- < Button onClick = { acceptTerms } > Accept</ Button >
57- < SecondaryButton onClick = { rejectTerms } > Reject</ SecondaryButton >
58+ { /* V2 Promo Section */ }
59+ < div className = "text-center mb-6 pb-6 border-b border-bkg-4" >
60+ < div className = "inline-flex items-center justify-center w-14 h-14 rounded-full bg-gradient-to-br from-[#7c3aed] to-[#6366f1] mb-3" >
61+ < svg
62+ className = "w-7 h-7 text-white"
63+ fill = "none"
64+ stroke = "currentColor"
65+ viewBox = "0 0 24 24"
66+ >
67+ < path
68+ strokeLinecap = "round"
69+ strokeLinejoin = "round"
70+ strokeWidth = { 2 }
71+ d = "M13 10V3L4 14h7v7l9-11h-7z"
72+ />
73+ </ svg >
74+ </ div >
75+ < h2 className = "text-xl font-bold text-fgd-1 mb-1" >
76+ Realms v2 is here
77+ </ h2 >
78+ < p className = "text-fgd-3 text-sm mb-3" >
79+ Faster, sharper, and built for you
80+ </ p >
81+ < div className = "flex flex-wrap justify-center gap-2" >
82+ < div className = "inline-flex items-center gap-2 text-sm text-green-400 bg-green-400/10 px-3 py-1.5 rounded-full" >
83+ < svg className = "w-4 h-4" fill = "currentColor" viewBox = "0 0 20 20" >
84+ < path fillRule = "evenodd" d = "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clipRule = "evenodd" />
85+ </ svg >
86+ Treasury prices now available
87+ </ div >
88+ < div className = "inline-flex items-center gap-2 text-sm text-green-400 bg-green-400/10 px-3 py-1.5 rounded-full" >
89+ < svg className = "w-4 h-4" fill = "currentColor" viewBox = "0 0 20 20" >
90+ < path fillRule = "evenodd" d = "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clipRule = "evenodd" />
91+ </ svg >
92+ All DAOs are there
93+ </ div >
94+ </ div >
95+ </ div >
96+
97+ { /* Terms Section */ }
98+ < div className = "mb-6" >
99+ < h3 className = "text-sm font-semibold text-fgd-2 mb-2" > Terms & Privacy Policy </ h3 >
100+ < p className = "text-sm text-fgd-3 text-justify" >
101+ The operating entity of this site and owner of the related
102+ intellectual property has changed. The new operator is Realms Today
103+ Ltd. (the New Operator). We have accordingly amended the Terms and
104+ the Private Policy governing the relationship between our users and
105+ the New Operator. By clicking "accept", you represent and warrant
106+ that you agree to the revised Terms and Private Policy.
107+ </ p >
108+ </ div >
109+
110+ { /* CTA Buttons */ }
111+ < div className = "space-y-3" >
112+ < Button
113+ className = "w-full bg-gradient-to-r from-[#7c3aed] to-[#6366f1] hover:from-[#6d31d4] hover:to-[#5558e0]"
114+ onClick = { acceptAndGoToV2 }
115+ >
116+ < span className = "flex items-center justify-center gap-2 text-white" >
117+ Accept & Try Realms v2
118+ < svg className = "w-4 h-4" fill = "none" stroke = "currentColor" viewBox = "0 0 24 24" >
119+ < path strokeLinecap = "round" strokeLinejoin = "round" strokeWidth = { 2 } d = "M13 7l5 5m0 0l-5 5m5-5H6" />
120+ </ svg >
121+ </ span >
122+ </ Button >
123+ < div className = "flex gap-3" >
124+ < SecondaryButton
125+ className = "flex-1"
126+ onClick = { acceptAndStay }
127+ >
128+ Accept & Stay on v1
129+ </ SecondaryButton >
130+ < SecondaryButton
131+ className = "flex-1 !text-red-400 hover:!text-red-300"
132+ onClick = { rejectTerms }
133+ >
134+ Reject
135+ </ SecondaryButton >
136+ </ div >
58137 </ div >
59138 </ Modal >
60139 ) : null }
0 commit comments