Skip to content

Commit

Permalink
t
Browse files Browse the repository at this point in the history
  • Loading branch information
conorgolden1 committed May 17, 2024
1 parent 7740bc5 commit e2392fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion frontend/src/components/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/Scratch/Comments.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client"

import { ChangeEvent, useRef, useState } from "react"
import { ChangeEvent, useCallback, useRef, useState } from "react"

import { useRouter } from "next/navigation"

Expand Down Expand Up @@ -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")
}
Expand All @@ -120,7 +120,7 @@ function CommentItem({ comment, canModify }: { comment: any, canModify?: boolean
}

if (comment.isEditing) {
return <EditComment comment={comment} stopEditing={stopEditing} submit={submit} />
return <EditComment comment={comment} stopEditing={stopEditing} submit={submitEdits} />
}

return (
Expand Down

0 comments on commit e2392fa

Please sign in to comment.