added contactProfile prop to pass contact username

This commit is contained in:
slawk0
2024-10-14 11:23:18 +02:00
parent c77c1cfd7e
commit 8b5915b8d3
2 changed files with 16 additions and 12 deletions

View File

@@ -1,19 +1,23 @@
import zdjecie from "../../assets/walter.png";
function ContactProfile() {
type ContactProfileProps = {
contactUsername: string;
};
function ContactProfile({ contactUsername }: ContactProfileProps) {
return (
<>
<div className="flex items-center">
<div className="m-3 rounded-full w-10 h-10 overflow-hidden ">
<img
className="w-full h-full object-cover"
src={zdjecie}
alt="walter"
draggable={false}
/>
</div>
<div className="m-2 flex items-center">
{/*// TODO contact profile img*/}
{/*<div className="m-3 rounded-full w-10 h-10 overflow-hidden ">*/}
{/* <img*/}
{/* className="w-full h-full object-cover"*/}
{/* src={zdjecie}*/}
{/* alt="profile image"*/}
{/* draggable={false}*/}
{/* />*/}
{/*</div>*/}
<div className="text-center text-gray-200">
<p>Walter White</p>
<p>{contactUsername}</p>
</div>
</div>
</>

View File

@@ -34,7 +34,7 @@ function Chat() {
<div className="text-white bg-[#121212] flex flex-col h-screen w-full">
{/*Messages*/}
<div className="flex">
<ContactProfile />
<ContactProfile contactUsername={contact} />
</div>
<hr />
{/*Messages input*/}