Skip to content

Commit

Permalink
errr
Browse files Browse the repository at this point in the history
  • Loading branch information
Shahan-nub committed Oct 24, 2024
1 parent bcdf98c commit 17cc5ee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
17 changes: 9 additions & 8 deletions src/components/Chat/ChatInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@ import db, { storage } from "@/firebase";
import { selectMenu } from "@/lib/features/menuSlice";
import { ref, uploadBytes, getDownloadURL } from "firebase/storage";
import { TbLoader2 } from "react-icons/tb";
import dynamic from "next/dynamic";
// import dynamic from "next/dynamic";
import heic2any from "heic2any";
import EmojiPicker from "emoji-picker-react";



const Picker = dynamic(
() => {
return import("emoji-picker-react");
},
{ ssr: false }
);
// const Picker = dynamic(
// () => {
// return import("emoji-picker-react");
// },
// { ssr: false }
// );

export default function ChatInput({ handleMessageUpdate }) {
const activeUser = useSelector(selectUser);
Expand Down Expand Up @@ -228,7 +229,7 @@ export default function ChatInput({ handleMessageUpdate }) {
<FaSmile onClick={() => setShowEmoji(!showEmoji)} className="text-slate-200 mx-1 md:mx-2 text-base lg:text-lg cursor-pointer hover:text-white"></FaSmile>
{showEmoji && (
<div className="absolute bottom-0 left-[10%]">
<Picker onEmojiClick={onEmojiClick}></Picker>
<EmojiPicker onEmojiClick={onEmojiClick}></EmojiPicker>
</div>
)}
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Chat/Message.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function Message({ messageInfo }) {
className="rounded-full mx-2 lg:mx-4 self-start"
></Image>
<div className="flex flex-col lg:w-auto sm:w-[90%] w-[80%]">
<div className="flex items-center justify-between">
<div className="flex items-center gap-4">
<h3 className="text-slate-300 text-sm lg:text-base font-semibold mr-4 lg:mr-8 ">
{user.displayName}
</h3>
Expand All @@ -40,7 +40,7 @@ export default function Message({ messageInfo }) {
</p>
</div>
{message && <p className="text-xs lg:text-[15px] font-extralight text-slate-200">{message}</p>}
{uploadedFile && <Image src={uploadedFile} alt="uploaded img" width={500} height={500} className="rounded-lg w-[35%]"/>}
{uploadedFile && <Image src={uploadedFile} alt="uploaded img" width={500} height={500} className="rounded-lg w-[35%] py-2"/>}
</div>
</div>
);
Expand Down

0 comments on commit 17cc5ee

Please sign in to comment.