From e2392fa388fa1820df11bac915ad4f4f16178bb8 Mon Sep 17 00:00:00 2001 From: Conor Golden Date: Thu, 16 May 2024 13:40:40 -0400 Subject: [PATCH] t --- frontend/src/components/Dropdown.tsx | 1 - frontend/src/components/Scratch/Comments.tsx | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/Dropdown.tsx b/frontend/src/components/Dropdown.tsx index d941d90b0..01e96b12b 100644 --- a/frontend/src/components/Dropdown.tsx +++ b/frontend/src/components/Dropdown.tsx @@ -27,7 +27,6 @@ export default function Dropdown({ options, children, className }: Props) { if (!ref?.current || ref.current.contains(event.target)) { return } - console.log("Called") closeDropdown() } diff --git a/frontend/src/components/Scratch/Comments.tsx b/frontend/src/components/Scratch/Comments.tsx index 7ead8a45e..ff72cb4f0 100644 --- a/frontend/src/components/Scratch/Comments.tsx +++ b/frontend/src/components/Scratch/Comments.tsx @@ -1,6 +1,6 @@ "use client" -import { ChangeEvent, useRef, useState } from "react" +import { ChangeEvent, useCallback, useRef, useState } from "react" import { useRouter } from "next/navigation" @@ -94,7 +94,7 @@ function CommentItem({ comment, canModify }: { comment: any, canModify?: boolean }, } - const submit = async (text: string) => { + const submitEdits = async (text: string) => { if (!userIsYou(comment.owner)) { throw new Error("Cannot save scratch which you do not own") } @@ -120,7 +120,7 @@ function CommentItem({ comment, canModify }: { comment: any, canModify?: boolean } if (comment.isEditing) { - return + return } return (