Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3628 Rev 3629
Línea 1... Línea 1...
1
import React from 'react';
1
import React from 'react';
2
import { Grid } from '@mui/material';
2
import { Grid } from '@mui/material';
Línea 3... Línea -...
3
 
-
 
4
import { useModal } from '@shared/hooks';
3
 
Línea 5... Línea 4...
5
import { useConversations } from '@inmail/hooks';
4
import { useConversations } from '@inmail/hooks';
6
 
5
 
Línea 7... Línea 6...
7
import { SearchUserModal, Spinner } from '@shared/components';
6
import { Spinner } from '@shared/components';
8
import { ConversationsList, MessagesList } from '@inmail/components';
7
import { ConversationsList, MessagesList } from '@inmail/components';
9
 
8
 
10
export const InmailPage = () => {
9
export const InmailPage = () => {
11
  const {
10
  const {
12
    conversations,
11
    conversations,
13
    currentConversation,
12
    currentConversation,
-
 
13
    loading,
14
    loading,
14
    setCurrentConversation,
Línea 15... Línea -...
15
    setCurrentConversation,
-
 
16
    deleteConversation
-
 
17
  } = useConversations();
-
 
18
 
-
 
19
  const { showModal, closeModal } = useModal();
-
 
20
 
-
 
21
  const showUserModal = () => {
-
 
22
    showModal(
-
 
23
      'Iniciar conversación',
-
 
24
      <SearchUserModal
-
 
25
        onSelect={(user) => {
-
 
26
          setCurrentConversation(user);
-
 
27
          closeModal();
-
 
28
        }}
-
 
29
      />
15
    deleteConversation,
Línea 30... Línea 16...
30
    );
16
    startConversation
31
  };
17
  } = useConversations();
32
 
18
 
Línea 43... Línea 29...
43
        }}
29
        }}
44
      >
30
      >
45
        <ConversationsList
31
        <ConversationsList
46
          conversations={conversations}
32
          conversations={conversations}
47
          onSelectConversation={setCurrentConversation}
33
          onSelectConversation={setCurrentConversation}
48
          onStartConversation={showUserModal}
34
          onStartConversation={startConversation}
49
        />
35
        />
50
      </Grid>
36
      </Grid>
Línea 51... Línea 37...
51
 
37
 
52
      <Grid
38
      <Grid