You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(create): exclude better-auth demo integration files when demo is disabled
The better-auth header-user components reference the /demo/better-auth route,
which doesn't exist when users opt out of demo files. Convert these to EJS
templates with conditional rendering so they return null instead of linking
to a non-existent route. Also extend isDemoFilePath filtering to cover
add-on integration files (previously only routes, lib, hooks, data, and
components were filtered in a037c4d).
Copy file name to clipboardExpand all lines: packages/create/src/frameworks/react/add-ons/better-auth/assets/src/integrations/better-auth/header-user.tsx.ejs
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
import { authClient } from "#/lib/auth-client";
2
+
<%_ if (routes.some(r=>r.url==='/demo/better-auth')) { _%>
Copy file name to clipboardExpand all lines: packages/create/src/frameworks/solid/add-ons/better-auth/assets/src/integrations/better-auth/header-user.tsx.ejs
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
import { Show } from "solid-js";
2
+
<%_ if (routes.some(r=>r.url==='/demo/better-auth')) { _%>
2
3
import { Link } from"@tanstack/solid-router";
4
+
<%_ } _%>
3
5
import { authClient } from "../../lib/auth-client";
4
6
5
7
export default function BetterAuthHeader() {
@@ -14,6 +16,7 @@ export default function BetterAuthHeader() {
0 commit comments