Skip to content

Commit cbbed09

Browse files
fix(web): use finalStack for Supabase checks
1 parent 85f7ac2 commit cbbed09

File tree

1 file changed

+16
-1
lines changed
  • apps/web/src/app/(home)/new/_components

1 file changed

+16
-1
lines changed

apps/web/src/app/(home)/new/_components/utils.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,7 @@ export const getDisabledReason = (
12931293
finalStack.database === "none" &&
12941294
optionId !== "none"
12951295
) {
1296-
return "ORM requires a database. Select a database first (SQLite, PostgreSQL, MySQL, or MongoDB).";
1296+
return "ORM requires a database. Select a database first (SQLite, PostgreSQL, or MongoDB).";
12971297
}
12981298

12991299
if (
@@ -1584,6 +1584,21 @@ export const getDisabledReason = (
15841584
}
15851585
}
15861586

1587+
if (category === "dbSetup" && optionId === "supabase") {
1588+
if ((finalStack.database as string) !== "postgres") {
1589+
return "Supabase requires PostgreSQL database. Select PostgreSQL first.";
1590+
}
1591+
}
1592+
1593+
if (
1594+
category === "database" &&
1595+
(finalStack.dbSetup as string) === "supabase"
1596+
) {
1597+
if (optionId !== "postgres") {
1598+
return "Selected DB Setup 'Supabase' requires PostgreSQL. Select PostgreSQL or change DB Setup.";
1599+
}
1600+
}
1601+
15871602
return null;
15881603
};
15891604

0 commit comments

Comments
 (0)