Rev 3614 | Rev 3619 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import React from 'react';
import { Grid } from '@mui/material';
import { useConversations } from '@inmail/hooks';
import { Spinner } from '@shared/components';
import { ConversationsList, MessagesList } from '@inmail/components';
export const InmailPage = () => {
const {
conversations,
currentConversation,
loading,
setCurrentConversation,
deleteConversation
} = useConversations();
const toggleConversationModal = () => {
// TODO: Implementar modal de inicio de conversación
};
if (loading) return <Spinner />;
return (
<Grid container spacing={1}>
<Grid
item
xs={12}
md={4}
sx={{
display: { xs: currentConversation ? 'none' : 'flex', md: 'flex' }
}}
>
<ConversationsList
conversations={conversations}
onSelectConversation={setCurrentConversation}
onStartConversation={toggleConversationModal}
/>
</Grid>
<Grid
item
xs={12}
md={8}
sx={{
display: { xs: currentConversation ? 'flex' : 'none', md: 'flex' }
}}
>
{/* <MessagesList
conversation={currentConversation}
onClose={() => setCurrentConversation(null)}
onDelete={() =>
currentConversation?.delete_link && deleteConversation(currentConversation.delete_link)
}
/> */}
</Grid>
</Grid>
);
};