From fdaf4cff1fa8770e91f3a7fbe7f9bf1297077040 Mon Sep 17 00:00:00 2001 From: fred <> Date: Thu, 7 Aug 2025 11:57:11 -0700 Subject: [PATCH] fix mobile tabs --- frontend/src/components/DemoModal.tsx | 2 +- frontend/src/components/Modal.tsx | 2 +- frontend/src/components/RecipeBookTabs.tsx | 32 ++++++++++++---------- frontend/src/pages/RecipePage.tsx | 2 +- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/frontend/src/components/DemoModal.tsx b/frontend/src/components/DemoModal.tsx index c3b1d0f..de4f6e9 100644 --- a/frontend/src/components/DemoModal.tsx +++ b/frontend/src/components/DemoModal.tsx @@ -10,7 +10,7 @@ const DemoModal = ({ isOpen, onClose, closeModal }: DemoModalProps) => { if (!isOpen) return null; return ( -
+
e.stopPropagation()}>

Thanks for checking out my app! Database write operations are disabled in demo mode.

diff --git a/frontend/src/components/Modal.tsx b/frontend/src/components/Modal.tsx index 8985471..5ee8453 100644 --- a/frontend/src/components/Modal.tsx +++ b/frontend/src/components/Modal.tsx @@ -10,7 +10,7 @@ const Modal = ({ isOpen, onClose, message, confirmAction, cancelAction }: ModalP if (!isOpen) return null; return ( -
+
e.stopPropagation()}>
{message} diff --git a/frontend/src/components/RecipeBookTabs.tsx b/frontend/src/components/RecipeBookTabs.tsx index 890e6fb..b00ba02 100644 --- a/frontend/src/components/RecipeBookTabs.tsx +++ b/frontend/src/components/RecipeBookTabs.tsx @@ -35,9 +35,9 @@ const RecipeBookTabs = () => { const tabs = [ - { id: '/', label: 'All Recipes', icon: '📚' }, + { id: '/', label: 'Cookbook', icon: '📚' }, { id: `/recipe/${lastViewedRecipeId}`, label: 'Recipe', icon: '🥗' }, - { id: '/add-recipe', label: 'Add Recipe', icon: '➕' }, + { id: '/add-recipe', label: 'Add', icon: '➕' }, { id: '/about', label: 'About', icon: '🍽️' }, ]; @@ -55,7 +55,7 @@ const RecipeBookTabs = () => { key={tab.id} to={tab.id} className={` - relative px-6 py-3 rounded-t-lg font-bold text-sm transform text-amber-800 + relative px-3 py-2 md:px-6 md:py-3 rounded-t-lg font-bold text-sm transform text-amber-800 ${isActive ? 'bg-amber-100 scale-105 z-10 border-t-2 border-amber-200' : 'bg-amber-200 hover:bg-amber-100 hover:text-amber-700 hover:scale-102 shadow-sm' @@ -64,21 +64,23 @@ const RecipeBookTabs = () => { ${isActive ? '' : ''} `} > -
- {tab.icon} +
+ {tab.icon} {tab.label}
- {isActive && ( - <> -
-
-
-
-
-
- - )} + { + isActive && ( + <> +
+
+
+
+
+
+ + ) + } ); })} diff --git a/frontend/src/pages/RecipePage.tsx b/frontend/src/pages/RecipePage.tsx index bfef52c..f5c1aea 100644 --- a/frontend/src/pages/RecipePage.tsx +++ b/frontend/src/pages/RecipePage.tsx @@ -100,7 +100,7 @@ function RecipePage() { ) : (
-