diff --git a/api/src/main.ts b/api/src/main.ts
index b1aa046..f24cdb3 100644
--- a/api/src/main.ts
+++ b/api/src/main.ts
@@ -3,6 +3,6 @@ import { AppModule } from "./modules/app/app.module";
async function bootstrap() {
const app = await NestFactory.create(AppModule);
- await app.listen(process.env.PORT ?? 3001);
+ await app.listen(process.env.PORT ?? 3000);
}
bootstrap();
diff --git a/web/src/core/features/pages/chats/chat-page/chat-page copy.tsx b/web/src/core/features/pages/chats/chat-page/chat-page copy.tsx
new file mode 100644
index 0000000..fa582ad
--- /dev/null
+++ b/web/src/core/features/pages/chats/chat-page/chat-page copy.tsx
@@ -0,0 +1,68 @@
+import { MainTag } from "@/components/atoms";
+import { Avatar, AvatarFallback, AvatarImage } from "@radix-ui/react-avatar";
+import { MoreVerticalIcon, Phone, PhoneCallIcon, VideoIcon } from "lucide-react";
+import { Input } from "../../../../components/ui/input";
+import { Button } from "../../../../components/ui/button";
+
+interface Props {
+ params: Promise<{ id: string }>;
+}
+
+export default async function ChatPage(props: Props) {
+ const { id } = await props.params;
+
+ return (
+
+
+
+
+
+ AN
+
+
+
+
Van
+
+ Online − Last Seen
+ 2:30pm
+
+
+
+
+
+
+
+
+ {/* Send */}
+
+
+
+ Hey There!
+
+
Today, 8.30pm
+
+
+ {/* Receive */}
+
+
+
Hello!
+
Today, 8.33pm
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/web/src/core/features/pages/chats/chat-page/chat-page.tsx b/web/src/core/features/pages/chats/chat-page/chat-page.tsx
index c933d42..bb752d9 100644
--- a/web/src/core/features/pages/chats/chat-page/chat-page.tsx
+++ b/web/src/core/features/pages/chats/chat-page/chat-page.tsx
@@ -1,11 +1,27 @@
+// "use client"
+
import type { Chat, Message } from "@/interfaces/chat.types";
import { MainTag } from "@/components/atoms";
import { Fetcher } from "@/lib/fetch";
+import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
+import { getInitials, getProfileURLFromInitials } from "@/lib/utils";
interface Props {
params: Promise<{ id: string }>;
}
+
+
+// const messageCard = () => {
+// return (
+//
+// )
+// }
+
export default async function ChatPage(props: Props) {
const { id } = await props.params;
@@ -16,11 +32,28 @@ export default async function ChatPage(props: Props) {
chat: Chat;
}>(`/api/chats/${id}`);
+ console.log(messages, 'yo')
+
+ const getPhoto = () => {
+ return chat.profileImg.url || getProfileURLFromInitials(chat.name);
+ }
+
return (
- Chats Page Loading messages with id: {id}
- {JSON.stringify(props, null, 4)}
- {JSON.stringify(messages, null, 2)}
+
+
+
+
+ {getInitials(chat.name)}
+
+
+ {/*
*/}
+
+
+
);
}
diff --git a/web/src/core/features/pages/chats/chats-layout/chat-list/chat-list.tsx b/web/src/core/features/pages/chats/chats-layout/chat-list/chat-list.tsx
index 7d9921e..daf3393 100644
--- a/web/src/core/features/pages/chats/chats-layout/chat-list/chat-list.tsx
+++ b/web/src/core/features/pages/chats/chats-layout/chat-list/chat-list.tsx
@@ -9,7 +9,7 @@ async function ChatList() {
<>
Inbox
- {chats.map((c) => (
+ {chats?.map((c) => (
))}
>