From d87faf4ec6caeffdd5113335ad52fc9fb088a9ab Mon Sep 17 00:00:00 2001 From: akhisud3195 Date: Thu, 10 Apr 2025 15:44:07 +0530 Subject: [PATCH] Fix project creation type errors --- apps/rowboat/app/projects/select/app.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/rowboat/app/projects/select/app.tsx b/apps/rowboat/app/projects/select/app.tsx index 8dae02a8..59bcb9c1 100644 --- a/apps/rowboat/app/projects/select/app.tsx +++ b/apps/rowboat/app/projects/select/app.tsx @@ -69,6 +69,9 @@ const TabType = { type TabState = typeof TabType[keyof typeof TabType]; +// Add a type guard to help TypeScript understand the comparison +const isNotBlankTemplate = (tab: TabState): boolean => tab !== 'blank'; + const tabStyles = clsx( "px-4 py-2 text-sm font-medium", "rounded-lg", @@ -494,7 +497,7 @@ export default function App() { style={{ minHeight: "120px" }} autoFocus autoResize - required={selectedTab !== TabType.Blank} + required={isNotBlankTemplate(selectedTab)} /> {promptError && (

@@ -510,7 +513,7 @@ export default function App() {

- 👇 Click "Create assistant" below to get started + 👇 Click “Create assistant” below to get started