Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3599 | Rev 3601 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 3599 Rev 3600
Línea 58... Línea 58...
58
          display: 'flex',
58
          display: 'flex',
59
          flexDirection: 'column-reverse',
59
          flexDirection: 'column-reverse',
60
          p: 1
60
          p: 1
61
        }}
61
        }}
62
      >
62
      >
63
        {messages.map((message) => (
63
        {messages.map((message, index) => {
-
 
64
          if (index === messages.length - 1) {
-
 
65
            return (
-
 
66
              <MessageItem
-
 
67
                key={message.uuid}
-
 
68
                message={message}
-
 
69
                onReport={handleReport}
-
 
70
                ref={messagesEndRef}
-
 
71
              />
-
 
72
            );
-
 
73
          }
-
 
74
 
64
          <MessageItem key={message.uuid} message={message} onReport={handleReport} />
75
          return <MessageItem key={message.uuid} message={message} onReport={handleReport} />;
65
        ))}
76
        })}
Línea 66... Línea 77...
66
 
77
 
67
        {/* Loading indicator for infinite scroll */}
78
        {/* Loading indicator for infinite scroll */}
68
        <Box ref={ref} sx={{ display: 'flex', justifyContent: 'center', py: 2 }}>
79
        <Box ref={ref} sx={{ display: 'flex', justifyContent: 'center', py: 2 }}>
69
          {loading && <Spinner size='small' />}
80
          {loading && <Spinner size='small' />}
70
        </Box>
-
 
71
 
-
 
72
        {/* Invisible element to scroll to bottom */}
-
 
73
        <div ref={messagesEndRef} />
81
        </Box>
74
      </Box>
82
      </Box>
75
    </Box>
83
    </Box>
76
  );
84
  );