showing up selection of convo on side

This commit is contained in:
talksik
2022-03-19 20:37:25 -04:00
parent 50c37776fd
commit 2a0f74435b
3 changed files with 18 additions and 5 deletions
+4
View File
@@ -3,6 +3,10 @@ body {
Arial, sans-serif;
}
#root {
padding: 0 !important;
}
@tailwind base;
@tailwind components;
@tailwind utilities;
+11 -4
View File
@@ -4,6 +4,7 @@ import { $searchQuery } from "../../controller/recoil";
import Conversations from "./conversations";
import Header from "./header";
import Search from "./search";
import SelectedConversation from "./selectedConversation";
import { useEffect } from "react";
import { useGetUserDetails } from "../../controller/";
import { useRecoilValue } from "recoil";
@@ -13,11 +14,17 @@ export default function Home() {
const searchQuery = useRecoilValue($searchQuery);
return (
<div className="h-screen w-full bg-slate-700">
{/* header */}
<Header />
<div className="h-screen bg-slate-700 flex flex-row">
<div className="flex-1">
{/* header */}
<Header />
{searchQuery ? <Search /> : <Conversations />}
{/* main content */}
{searchQuery ? <Search /> : <Conversations />}
</div>
<SelectedConversation />
</div>
);
}
@@ -15,5 +15,7 @@ export default function SelectedConversation() {
* all messages between me and them
*/
return <span>this is the selected conversation</span>;
return (
<div className="bg-slate-800 flex-1">this is the selected conversation</div>
);
}