From fdd67465dc1fec885ee4ffb3fa30098ab53a727a Mon Sep 17 00:00:00 2001
From: Hugo
Date: Fri, 19 Jun 2026 07:59:04 +0200
Subject: [PATCH] refactor(home): extract shared CtaButtons helper
The hero and closing CTA rendered the same primary + auth-aware secondary
button pair; extract it into one helper.
---
app/routes/index.tsx | 40 ++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/app/routes/index.tsx b/app/routes/index.tsx
index 410596a..8f15bf6 100644
--- a/app/routes/index.tsx
+++ b/app/routes/index.tsx
@@ -25,6 +25,24 @@ function SectionHead({ title, sub }: { title: string; sub?: Child }) {
);
}
+// Primary + auth-aware secondary CTA pair, shared by the hero and the closing band.
+function CtaButtons({ user }: { user: { handle: string } | null }) {
+ return (
+ <>
+
+ {user ? (
+
+ ) : (
+
+ )}
+ >
+ );
+}
+
const jsonLdBody = JSON.stringify({
"@context": "https://schema.org",
"@type": "WebApplication",
@@ -70,16 +88,7 @@ export default createRoute(async (c) => {
conditions, and send a webhook, create a record on your PDS, or post to Bluesky.
-
- {user ? (
-
- ) : (
-
- )}
+
@@ -186,16 +195,7 @@ export default createRoute(async (c) => {
Ready to wire your apps together?
-
- {user ? (
-
- ) : (
-
- )}
+
--
2.51.2