Skip to content

Commit

Permalink
optimizing delete button
Browse files Browse the repository at this point in the history
  • Loading branch information
chuma-beep committed Oct 16, 2024
1 parent 808ca1e commit 1aba062
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/post/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ export default function PostPage() {
const { data: userData, error: userError } = await supabase.auth.getUser();
if (userError) {
// console.error("User Error: ", userError.message);
toast.error("error fetching user");
toast.error("error");
return;
}

Expand Down Expand Up @@ -500,7 +500,6 @@ export default function PostPage() {
</div>
</div>
{/* Optionally add delete button if user is authorized */}
Uncomment and implement authorization logic if needed
<button onClick={() => handleDeleteComment(comment.id)}>
<MdOutlineDelete />
</button>
Expand Down

0 comments on commit 1aba062

Please sign in to comment.