2023-02-07 09:41:54 -05:00
|
|
|
import React from 'react';
|
2023-02-07 10:26:19 -05:00
|
|
|
import Messages from './components/main/Messages';
|
|
|
|
|
import TextChat from './components/main/TextChat';
|
2023-02-06 13:27:28 -05:00
|
|
|
import Nav from './components/Nav';
|
2023-02-07 10:26:19 -05:00
|
|
|
import MobileNav from './components/Nav/MobileNav';
|
2023-02-13 13:32:54 -05:00
|
|
|
import { useSelector } from 'react-redux';
|
2023-02-04 19:19:53 -05:00
|
|
|
|
|
|
|
|
const App = () => {
|
2023-02-13 13:32:54 -05:00
|
|
|
|
2023-02-07 16:22:35 -05:00
|
|
|
const { messages } = useSelector((state) => state.messages);
|
2023-02-13 13:32:54 -05:00
|
|
|
const convo = useSelector((state) => state.convo);
|
2023-02-06 18:25:11 -05:00
|
|
|
|
2023-02-04 19:19:53 -05:00
|
|
|
return (
|
|
|
|
|
<div className="flex h-screen">
|
2023-02-13 10:20:21 -05:00
|
|
|
<Nav />
|
2023-02-06 13:27:28 -05:00
|
|
|
<div className="flex h-full w-full flex-1 flex-col bg-gray-50 md:pl-[260px]">
|
2023-02-08 22:58:24 -05:00
|
|
|
<div className="transition-width relative flex h-full w-full flex-1 flex-col items-stretch overflow-hidden dark:bg-gray-800">
|
2023-02-08 15:26:42 -05:00
|
|
|
<MobileNav />
|
2023-02-13 13:32:54 -05:00
|
|
|
<Messages messages={messages} title={convo.title}/>
|
|
|
|
|
<TextChat messages={messages}/>
|
2023-02-08 09:15:47 -05:00
|
|
|
</div>
|
2023-02-04 19:19:53 -05:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default App;
|