From 081c4e401705198f44f058502c1dcfc6de489a5d Mon Sep 17 00:00:00 2001 From: Xinacod Date: Tue, 17 Mar 2026 12:35:21 +0100 Subject: [PATCH 1/2] Hide back button on home page and edit option on deleted reviews NavBar: the back arrow was showing on every page including the root home page where there's nowhere to go back to. Added a pathname check so it only renders when you're not on '/'. ReviewCard: the edit pencil was visible to the review author even after the review had been soft-deleted (deleted_at set). Added a !deleted_at guard so the edit option only shows up on reviews that haven't been deleted. Fixes #312, #290 --- src/components/articles/ReviewCard.tsx | 2 +- src/components/common/NavBar.tsx | 27 ++++++++++++-------------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/src/components/articles/ReviewCard.tsx b/src/components/articles/ReviewCard.tsx index 611036af..9d9cba22 100644 --- a/src/components/articles/ReviewCard.tsx +++ b/src/components/articles/ReviewCard.tsx @@ -168,7 +168,7 @@ const ReviewCard: FC = ({ review, refetch }) => {
{review.user.username} - {review.is_author && ( + {review.is_author && !review.deleted_at && ( <> (You) {/* Fixed by Codex on 2026-02-15 diff --git a/src/components/common/NavBar.tsx b/src/components/common/NavBar.tsx index 8b06e079..4824bb52 100644 --- a/src/components/common/NavBar.tsx +++ b/src/components/common/NavBar.tsx @@ -225,21 +225,18 @@ const NavBar: React.FC = () => {