From 84bfde4a7e3351ae76da683733def8877314d13a Mon Sep 17 00:00:00 2001 From: Amar Trebinjac Date: Wed, 7 Jan 2026 13:42:23 +0100 Subject: [PATCH 1/2] fix: use soft navigation in CreatePostButton instead of hard navigation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace direct href on Button with Link wrapper to enable client-side routing when navigating to the create post page. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 --- .../post/write/CreatePostButton.tsx | 66 ++++++++++++------- 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/packages/shared/src/components/post/write/CreatePostButton.tsx b/packages/shared/src/components/post/write/CreatePostButton.tsx index 56049fcf28..01dc93c1c7 100644 --- a/packages/shared/src/components/post/write/CreatePostButton.tsx +++ b/packages/shared/src/components/post/write/CreatePostButton.tsx @@ -17,6 +17,7 @@ import ConditionalWrapper from '../../ConditionalWrapper'; import { Tooltip } from '../../tooltip/Tooltip'; import { ActionType } from '../../../graphql/actions'; import { Typography, TypographyType } from '../../typography/Typography'; +import Link from '../../utilities/Link'; interface CreatePostButtonProps extends Pick, 'className' | 'onClick' | 'size'> { @@ -88,9 +89,10 @@ export function CreatePostButton({ const buttonProps: { tag?: AllowedTags; - href?: string; onClick?: (e: React.MouseEvent) => void; - } = onClick ? { onClick } : { tag: 'a', href }; + } = onClick ? { onClick } : { tag: 'a' }; + + const shouldUseLink = !onClick; const shouldShowAsCompact = compact !== false && ((isLaptop && !isLaptopL) || compact); @@ -105,19 +107,38 @@ export function CreatePostButton({ You can now create polls! - + + + ); }; + const button = ( + + ); + return ( ({ )} > - + {button} + ); } From 89a647bc559703f45e2045a8d9877ac7dac6d5eb Mon Sep 17 00:00:00 2001 From: Amar Trebinjac Date: Wed, 7 Jan 2026 13:58:53 +0100 Subject: [PATCH 2/2] style: fix prettier formatting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../shared/src/components/post/write/CreatePostButton.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/shared/src/components/post/write/CreatePostButton.tsx b/packages/shared/src/components/post/write/CreatePostButton.tsx index 01dc93c1c7..75ee24c78a 100644 --- a/packages/shared/src/components/post/write/CreatePostButton.tsx +++ b/packages/shared/src/components/post/write/CreatePostButton.tsx @@ -124,9 +124,7 @@ export function CreatePostButton({ const button = (