Skip to content

Commit

Permalink
code cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
Diivvuu committed Oct 17, 2024
1 parent 8ddc221 commit 5e85ea3
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 16 deletions.
1 change: 0 additions & 1 deletion convex/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { v } from "convex/values";
import { mutation, query, QueryCtx } from "./_generated/server";
import { getAuthUserId } from "@convex-dev/auth/server";
import { Doc, Id } from "./_generated/dataModel";
import { timeStamp } from "console";
import { paginationOptsValidator } from "convex/server";

const populateThread = async (ctx: QueryCtx, messageId: Id<"messages">) => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function Home() {
} else if (!open) {
setOpen(true);
} else {
console.log("open creation mdoel");
console.log("open creation model");
}
}, [workspaceId, isLoading, open, setOpen]);
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export const ChatInput = ({ placeholder }: ChatInputProps) => {
body: string;
image: File | null;
}) => {
console.log(body, image);
try {
setPending(true);
editorRef?.current?.enable(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const ChannelIdPage = () => {
const { data: channel, isLoading: channelLoading } = useGetChannel({
id: channelId,
});
console.log({ results });
if (channelLoading || status === "LoadingFirstPage") {
return (
<div className="h-full flex-1 flex items-center justify-center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export const ChatInput = ({ placeholder, conversationId }: ChatInputProps) => {
body: string;
image: File | null;
}) => {
console.log(body, image);
try {
setPending(true);
editorRef?.current?.enable(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export const Conversations = ({ id }: ConversationProps) => {
const { data: member, isLoading: memberLoading } = useGetMember({
id: memberId,
});
console.log(member);
const { results, status, loadMore } = useGetMessages({
conversationId: id,
});
Expand Down
4 changes: 0 additions & 4 deletions src/components/message-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,10 @@ interface MessageListProps {
}

const formatDateLabel = (dateStr: string) => {
console.log(dateStr);

// Replace double hyphens with single hyphen
const correctedDateStr = dateStr.replace(/--/g, "-");
const date = new Date(correctedDateStr);

console.log(date);

if (isToday(date)) return "Today";
if (isYesterday(date)) return "Yesterday";
return format(date, "EEEE, MMMM d");
Expand Down
1 change: 0 additions & 1 deletion src/features/messages/api/use-get-messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export const useGetMessages = ({
},
{ initialNumItems: BATCH_SIZE }
);
console.log(results, status, loadMore);
return {
results,
status,
Expand Down
4 changes: 0 additions & 4 deletions src/features/messages/components/thread.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export const Threads = ({ messageId, onClose }: ThreadsProps) => {
body: string;
image: File | null;
}) => {
console.log(body, image);
try {
setPending(true);
editorRef?.current?.enable(false);
Expand Down Expand Up @@ -118,13 +117,10 @@ export const Threads = ({ messageId, onClose }: ThreadsProps) => {
);

const formatDateLabel = (dateStr: string) => {
console.log(dateStr);

// Replace double hyphens with single hyphen
const correctedDateStr = dateStr.replace(/--/g, "-");
const date = new Date(correctedDateStr);

console.log(date);

if (isToday(date)) return "Today";
if (isYesterday(date)) return "Yesterday";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export const CreateWorkSpaceModal = () => {
{ name },
{
onSuccess(Id) {
// console.log(data);
toast.success("Workspace created!")
router.push(`/workspace/${Id}`);
handleClose();
Expand Down

0 comments on commit 5e85ea3

Please sign in to comment.