1919
2020'use client' ;
2121
22- import { useState , useEffect } from 'react' ;
22+ import { useState , useEffect , useRef } from 'react' ;
2323import {
2424 Container ,
2525 Title ,
@@ -94,6 +94,7 @@ export default function ResilientDBLanding() {
9494 const [ typewriterText , setTypewriterText ] = useState ( '' ) ;
9595 const [ currentLine , setCurrentLine ] = useState ( 0 ) ;
9696 const [ currentIndex , setCurrentIndex ] = useState ( Math . floor ( ( ecosystemProjects . length - 3 ) / 2 ) ) ;
97+ const terminalRef = useRef < HTMLPreElement > ( null ) ;
9798
9899 const terminalLines = [
99100 '🔗 ResilientDB Node Dependencies:' ,
@@ -115,6 +116,13 @@ export default function ResilientDBLanding() {
115116 }
116117 } , [ currentLine , terminalLines ] ) ;
117118
119+ // Auto-scroll to bottom when text updates
120+ useEffect ( ( ) => {
121+ if ( terminalRef . current ) {
122+ terminalRef . current . scrollTop = terminalRef . current . scrollHeight ;
123+ }
124+ } , [ typewriterText ] ) ;
125+
118126 const cardWidth = 320 ;
119127 const canGoNext = currentIndex < ecosystemProjects . length - 3 ;
120128 const canGoPrev = currentIndex > 0 ;
@@ -288,11 +296,26 @@ export default function ResilientDBLanding() {
288296 < Text
289297 component = { Link }
290298 href = "https://resilientdb.com/"
291- c = "pink"
292- td = "underline"
293299 style = { {
294- transition : 'color 0.2s ease' ,
295- cursor : 'pointer'
300+ color : '#51cf66' ,
301+ textDecoration : 'none' ,
302+ padding : '2px 6px' ,
303+ borderRadius : '4px' ,
304+ background : 'rgba(81, 207, 102, 0.1)' ,
305+ border : '1px solid rgba(81, 207, 102, 0.2)' ,
306+ transition : 'all 0.3s ease' ,
307+ cursor : 'pointer' ,
308+ fontWeight : 500
309+ } }
310+ onMouseEnter = { ( e ) => {
311+ e . currentTarget . style . background = 'rgba(81, 207, 102, 0.2)' ;
312+ e . currentTarget . style . borderColor = 'rgba(81, 207, 102, 0.4)' ;
313+ e . currentTarget . style . transform = 'translateY(-1px)' ;
314+ } }
315+ onMouseLeave = { ( e ) => {
316+ e . currentTarget . style . background = 'rgba(81, 207, 102, 0.1)' ;
317+ e . currentTarget . style . borderColor = 'rgba(81, 207, 102, 0.2)' ;
318+ e . currentTarget . style . transform = 'translateY(0)' ;
296319 } }
297320 >
298321 the official website
@@ -382,15 +405,21 @@ export default function ResilientDBLanding() {
382405 </ Group >
383406
384407 < Box
408+ ref = { terminalRef }
385409 component = "pre"
386410 style = { {
387411 color : '#51cf66' ,
388412 fontFamily : "'Monaco', 'Menlo', 'Ubuntu Mono', monospace" ,
389413 fontSize : '0.875rem' ,
390414 lineHeight : 1.6 ,
391415 whiteSpace : 'pre-wrap' ,
392- minHeight : '200px' ,
393- margin : 0
416+ height : '250px' ,
417+ maxHeight : '250px' ,
418+ overflowY : 'auto' ,
419+ margin : 0 ,
420+ padding : '1rem' ,
421+ scrollbarWidth : 'thin' ,
422+ scrollbarColor : '#373a40 #1a1b23'
394423 } }
395424 >
396425 { typewriterText }
@@ -411,14 +440,29 @@ export default function ResilientDBLanding() {
411440 < Text
412441 component = { Link }
413442 href = "https://github.com/ResilientApp"
414- c = "pink"
415- td = "underline"
416443 style = { {
417- transition : 'color 0.2s ease' ,
444+ color : '#51cf66' ,
445+ textDecoration : 'none' ,
446+ padding : '6px 12px' ,
447+ borderRadius : '6px' ,
448+ background : 'rgba(81, 207, 102, 0.1)' ,
449+ border : '1px solid rgba(81, 207, 102, 0.2)' ,
450+ transition : 'all 0.3s ease' ,
418451 cursor : 'pointer' ,
452+ fontWeight : 500 ,
419453 display : 'inline-flex' ,
420454 alignItems : 'center' ,
421- gap : '4px'
455+ gap : '6px'
456+ } }
457+ onMouseEnter = { ( e ) => {
458+ e . currentTarget . style . background = 'rgba(81, 207, 102, 0.2)' ;
459+ e . currentTarget . style . borderColor = 'rgba(81, 207, 102, 0.4)' ;
460+ e . currentTarget . style . transform = 'translateY(-1px)' ;
461+ } }
462+ onMouseLeave = { ( e ) => {
463+ e . currentTarget . style . background = 'rgba(81, 207, 102, 0.1)' ;
464+ e . currentTarget . style . borderColor = 'rgba(81, 207, 102, 0.2)' ;
465+ e . currentTarget . style . transform = 'translateY(0)' ;
422466 } }
423467 >
424468 Visit the ResilientDB Hub for more projects
0 commit comments