@@ -31,7 +31,6 @@ export function LoginMain(): JSX.Element {
3131 type ?: string ;
3232 } ;
3333
34- // Check for error messages (version mismatch)
3534 if ( data . error && data . type === 'version_mismatch' ) {
3635 setErrorMessage (
3736 data . message ||
@@ -41,9 +40,7 @@ export function LoginMain(): JSX.Element {
4140 return ;
4241 }
4342
44- // Handle successful authentication
4543 if ( data . token ) {
46- console . log ( data . token ) ;
4744 await signInWithCustomToken ( data . token ) ;
4845 }
4946 } ;
@@ -53,47 +50,49 @@ export function LoginMain(): JSX.Element {
5350 eventSource . close ( ) ;
5451 } ;
5552 }
53+
5654 const getOfferData = async ( ) : Promise < void > => {
5755 const { data } = await axios . get < { uri : string } > (
5856 new URL (
5957 '/api/auth/offer' ,
6058 process . env . NEXT_PUBLIC_BASE_URL
6159 ) . toString ( )
6260 ) ;
63- console . log ( 'getting offer data' ) ;
6461 setQr ( data . uri ) ;
6562 watchEventStream (
6663 new URL ( data . uri ) . searchParams . get ( 'session' ) as string
6764 ) ;
6865 } ;
66+
6967 const getAppStoreLink = ( ) => {
7068 if ( typeof window === 'undefined' || typeof navigator === 'undefined' ) {
7169 return 'https://play.google.com/store/apps/details?id=foundation.metastate.eid_wallet' ;
7270 }
71+
7372 const userAgent =
7473 navigator . userAgent || navigator . vendor || ( window as any ) . opera ;
74+
7575 if ( / a n d r o i d / i. test ( userAgent ) ) {
7676 return 'https://play.google.com/store/apps/details?id=foundation.metastate.eid_wallet' ;
7777 }
78+
7879 if ( / i P a d | i P h o n e | i P o d / . test ( userAgent ) && ! ( window as any ) . MSStream ) {
7980 return 'https://apps.apple.com/in/app/eid-for-w3ds/id6747748667' ;
8081 }
82+
8183 return 'https://play.google.com/store/apps/details?id=foundation.metastate.eid_wallet' ;
8284 } ;
8385
8486 useEffect ( ( ) => {
85- getOfferData ( )
86- . then ( ( ) : void => {
87- console . log ( 'QR code data fetched successfully.' ) ;
88- } )
89- . catch ( ( error ) : void => {
90- console . error ( 'Error fetching QR code data:' , error ) ;
91- } ) ;
87+ getOfferData ( ) . catch ( ( error ) =>
88+ console . error ( 'Error fetching QR code data:' , error )
89+ ) ;
9290 } , [ ] ) ;
9391
9492 return (
9593 < main className = 'grid lg:grid-cols-[1fr,45vw]' >
96- < div className = 'relative hidden items-center justify-center lg:flex' >
94+ { /* Left side image */ }
95+ < div className = 'relative hidden items-center justify-center lg:flex' >
9796 < NextImage
9897 imgClassName = 'object-cover'
9998 blurClassName = 'bg-accent-blue'
@@ -103,16 +102,20 @@ export function LoginMain(): JSX.Element {
103102 useSkeleton
104103 />
105104 </ div >
106- < div className = 'flex flex-col items-center justify-between gap-6 p-8 lg:items-start lg:justify-center min-h-screen' >
105+
106+ { /* Right side content */ }
107+ < div className = 'flex flex-col items-center justify-between gap-6 p-8 lg:items-center lg:justify-center min-h-screen' >
107108 < div className = 'flex max-w-xs flex-col gap-4 font-twitter-chirp-extended lg:max-w-none lg:gap-16' >
108- < h1 className = 'text-3xl before:content-["See_what’s_happening_in_the_world_right_now."] lg:text-6xl lg:before:content-["Happening_now"]' >
109+ < h1 className = 'text-center text- 3xl before:content-["See_what’s_happening_in_the_world_right_now."] lg:text-6xl lg:before:content-["Happening_now"]' >
109110 < span className = 'sr-only' >
110111 See what’s happening in the world right now.
111112 </ span >
112113 </ h1 >
113- < h2 className = 'hidden text-xl lg:block lg:text-3xl' >
114+
115+ < h2 className = 'hidden text-center text-xl lg:block lg:text-3xl' >
114116 Join Blabsy today.
115117 </ h2 >
118+
116119 < div >
117120 { errorMessage && (
118121 < div className = 'mb-4 p-4 bg-red-100 border border-red-400 text-red-700 rounded-lg' >
@@ -122,6 +125,7 @@ export function LoginMain(): JSX.Element {
122125 < p className = 'text-sm' > { errorMessage } </ p >
123126 </ div >
124127 ) }
128+
125129 { isMobileDevice ( ) ? (
126130 < div className = 'flex flex-col gap-4 items-center' >
127131 < div className = 'text-xs text-gray-500 text-center max-w-xs' >
@@ -133,12 +137,14 @@ export function LoginMain(): JSX.Element {
133137 </ a > { ' ' }
134138 to login
135139 </ div >
140+
136141 < a
137142 href = { qr ? getDeepLinkUrl ( qr ) : '#' }
138143 className = 'px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors text-center'
139144 >
140145 Login with eID Wallet
141146 </ a >
147+
142148 < div className = 'text-center mt-4' >
143149 < p className = 'text-sm text-gray-500' >
144150 < span className = 'mb-1 block font-bold text-gray-600' >
@@ -162,9 +168,11 @@ export function LoginMain(): JSX.Element {
162168 </ a > { ' ' }
163169 to login
164170 </ p >
171+
165172 < div className = 'p-2 rounded-md bg-white w-fit' >
166173 { qr && < QRCode value = { qr } /> }
167174 </ div >
175+
168176 < div className = 'text-center mt-4' >
169177 < p className = 'text-sm text-gray-500' >
170178 < span className = 'mb-1 block font-bold text-gray-600' >
@@ -179,23 +187,18 @@ export function LoginMain(): JSX.Element {
179187 </ div >
180188 ) }
181189 </ div >
182- < div className = 'absolute right-0 rotate-90 top-1/2' >
183- < Image
184- src = '/assets/w3dslogo.svg'
185- alt = 'W3DS logo'
186- width = { 100 }
187- height = { 20 }
188- />
189- </ div >
190190 </ div >
191+
192+ { /* Bottom Info Box */ }
191193 < div className = 'flex max-w-lg flex-col gap-6 [&_button]:py-2 bg-white/20 p-4 rounded-lg' >
192- < div className = 'grid gap-3 font-bold text-white/80 ' >
194+ < div className = 'grid gap-3 text-center font-bold text-white/70 ' >
193195 You are entering Blabsy - a social network built on the
194196 Web 3.0 Data Space (W3DS) architecture. This system is
195- designed around the principle of data-platform
196- separation, where all your personal content is stored in
197- your own sovereign eVault, not on centralised servers.
197+ designed around data-platform separation, where all your
198+ personal content is stored in your own sovereign eVault,
199+ not on centralized servers.
198200 </ div >
201+
199202 < a
200203 href = 'https://metastate.foundation'
201204 target = '_blank'
0 commit comments