create-better-t-stack 3.7.1 → 3.7.3-canary.53fc0031
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +108 -250
- package/dist/index.js +1 -1
- package/dist/{src-BmyCNYPk.js → src-B1ogWZqk.js} +205 -368
- package/package.json +3 -3
- package/templates/api/orpc/server/package.json.hbs +0 -3
- package/templates/api/trpc/server/package.json.hbs +1 -4
- package/templates/auth/better-auth/convex/native/base/lib/auth-client.ts.hbs +0 -2
- package/templates/auth/better-auth/server/base/package.json.hbs +1 -4
- package/templates/auth/better-auth/web/react/base/src/lib/auth-client.ts.hbs +6 -2
- package/templates/auth/better-auth/web/react/tanstack-router/src/components/sign-in-form.tsx +117 -121
- package/templates/auth/better-auth/web/react/tanstack-router/src/components/sign-up-form.tsx +141 -145
- package/templates/auth/better-auth/web/react/tanstack-start/src/components/sign-in-form.tsx +117 -121
- package/templates/auth/better-auth/web/react/tanstack-start/src/components/sign-up-form.tsx +141 -145
- package/templates/auth/better-auth/web/solid/src/components/sign-in-form.tsx +3 -11
- package/templates/auth/better-auth/web/solid/src/components/sign-up-form.tsx +4 -14
- package/templates/backend/convex/packages/backend/convex/healthCheck.ts +2 -2
- package/templates/backend/convex/packages/backend/package.json.hbs +1 -2
- package/templates/backend/server/base/package.json.hbs +1 -3
- package/templates/db/base/package.json.hbs +1 -4
- package/templates/examples/ai/native/bare/polyfills.js +3 -7
- package/templates/examples/ai/native/unistyles/polyfills.js +3 -6
- package/templates/examples/ai/native/uniwind/polyfills.js +3 -7
- package/templates/examples/todo/server/drizzle/postgres/src/schema/todo.ts +1 -1
- package/templates/frontend/native/bare/package.json.hbs +1 -2
- package/templates/frontend/native/unistyles/package.json.hbs +1 -2
- package/templates/frontend/native/uniwind/package.json.hbs +1 -2
- package/templates/frontend/nuxt/package.json.hbs +1 -3
- package/templates/frontend/react/next/package.json.hbs +1 -3
- package/templates/frontend/react/react-router/package.json.hbs +1 -3
- package/templates/frontend/react/react-router/src/components/mode-toggle.tsx +3 -9
- package/templates/frontend/react/tanstack-router/package.json.hbs +1 -3
- package/templates/frontend/react/tanstack-router/src/components/mode-toggle.tsx +3 -9
- package/templates/frontend/react/tanstack-start/package.json.hbs +1 -3
- package/templates/frontend/react/web-base/src/components/ui/button.tsx +13 -16
- package/templates/frontend/react/web-base/src/components/ui/card.tsx +13 -30
- package/templates/frontend/react/web-base/src/components/ui/checkbox.tsx +8 -11
- package/templates/frontend/react/web-base/src/components/ui/dropdown-menu.tsx +37 -66
- package/templates/frontend/react/web-base/src/components/ui/input.tsx +5 -5
- package/templates/frontend/react/web-base/src/components/ui/label.tsx +7 -10
- package/templates/frontend/react/web-base/src/components/ui/skeleton.tsx +3 -3
- package/templates/frontend/react/web-base/src/lib/utils.ts +3 -3
- package/templates/frontend/solid/package.json.hbs +1 -3
- package/templates/frontend/svelte/package.json.hbs +1 -3
- package/templates/frontend/svelte/src/app.d.ts +7 -7
- package/templates/frontend/svelte/src/lib/index.ts +1 -0
- package/templates/frontend/svelte/vite.config.ts +4 -4
|
@@ -8,132 +8,128 @@ import { Button } from "./ui/button";
|
|
|
8
8
|
import { Input } from "./ui/input";
|
|
9
9
|
import { Label } from "./ui/label";
|
|
10
10
|
|
|
11
|
-
export default function SignInForm({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
})
|
|
16
|
-
const navigate = useNavigate({
|
|
17
|
-
from: "/",
|
|
18
|
-
});
|
|
19
|
-
const { isPending } = authClient.useSession();
|
|
11
|
+
export default function SignInForm({ onSwitchToSignUp }: { onSwitchToSignUp: () => void }) {
|
|
12
|
+
const navigate = useNavigate({
|
|
13
|
+
from: "/",
|
|
14
|
+
});
|
|
15
|
+
const { isPending } = authClient.useSession();
|
|
20
16
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
17
|
+
const form = useForm({
|
|
18
|
+
defaultValues: {
|
|
19
|
+
email: "",
|
|
20
|
+
password: "",
|
|
21
|
+
},
|
|
22
|
+
onSubmit: async ({ value }) => {
|
|
23
|
+
await authClient.signIn.email(
|
|
24
|
+
{
|
|
25
|
+
email: value.email,
|
|
26
|
+
password: value.password,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
onSuccess: () => {
|
|
30
|
+
navigate({
|
|
31
|
+
to: "/dashboard",
|
|
32
|
+
});
|
|
33
|
+
toast.success("Sign in successful");
|
|
34
|
+
},
|
|
35
|
+
onError: (error) => {
|
|
36
|
+
toast.error(error.error.message || error.error.statusText);
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
);
|
|
40
|
+
},
|
|
41
|
+
validators: {
|
|
42
|
+
onSubmit: z.object({
|
|
43
|
+
email: z.email("Invalid email address"),
|
|
44
|
+
password: z.string().min(8, "Password must be at least 8 characters"),
|
|
45
|
+
}),
|
|
46
|
+
},
|
|
47
|
+
});
|
|
52
48
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
if (isPending) {
|
|
50
|
+
return <Loader />;
|
|
51
|
+
}
|
|
56
52
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
return (
|
|
54
|
+
<div className="mx-auto w-full mt-10 max-w-md p-6">
|
|
55
|
+
<h1 className="mb-6 text-center text-3xl font-bold">Welcome Back</h1>
|
|
60
56
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
57
|
+
<form
|
|
58
|
+
onSubmit={(e) => {
|
|
59
|
+
e.preventDefault();
|
|
60
|
+
e.stopPropagation();
|
|
61
|
+
form.handleSubmit();
|
|
62
|
+
}}
|
|
63
|
+
className="space-y-4"
|
|
64
|
+
>
|
|
65
|
+
<div>
|
|
66
|
+
<form.Field name="email">
|
|
67
|
+
{(field) => (
|
|
68
|
+
<div className="space-y-2">
|
|
69
|
+
<Label htmlFor={field.name}>Email</Label>
|
|
70
|
+
<Input
|
|
71
|
+
id={field.name}
|
|
72
|
+
name={field.name}
|
|
73
|
+
type="email"
|
|
74
|
+
value={field.state.value}
|
|
75
|
+
onBlur={field.handleBlur}
|
|
76
|
+
onChange={(e) => field.handleChange(e.target.value)}
|
|
77
|
+
/>
|
|
78
|
+
{field.state.meta.errors.map((error) => (
|
|
79
|
+
<p key={error?.message} className="text-red-500">
|
|
80
|
+
{error?.message}
|
|
81
|
+
</p>
|
|
82
|
+
))}
|
|
83
|
+
</div>
|
|
84
|
+
)}
|
|
85
|
+
</form.Field>
|
|
86
|
+
</div>
|
|
91
87
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
88
|
+
<div>
|
|
89
|
+
<form.Field name="password">
|
|
90
|
+
{(field) => (
|
|
91
|
+
<div className="space-y-2">
|
|
92
|
+
<Label htmlFor={field.name}>Password</Label>
|
|
93
|
+
<Input
|
|
94
|
+
id={field.name}
|
|
95
|
+
name={field.name}
|
|
96
|
+
type="password"
|
|
97
|
+
value={field.state.value}
|
|
98
|
+
onBlur={field.handleBlur}
|
|
99
|
+
onChange={(e) => field.handleChange(e.target.value)}
|
|
100
|
+
/>
|
|
101
|
+
{field.state.meta.errors.map((error) => (
|
|
102
|
+
<p key={error?.message} className="text-red-500">
|
|
103
|
+
{error?.message}
|
|
104
|
+
</p>
|
|
105
|
+
))}
|
|
106
|
+
</div>
|
|
107
|
+
)}
|
|
108
|
+
</form.Field>
|
|
109
|
+
</div>
|
|
114
110
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
111
|
+
<form.Subscribe>
|
|
112
|
+
{(state) => (
|
|
113
|
+
<Button
|
|
114
|
+
type="submit"
|
|
115
|
+
className="w-full"
|
|
116
|
+
disabled={!state.canSubmit || state.isSubmitting}
|
|
117
|
+
>
|
|
118
|
+
{state.isSubmitting ? "Submitting..." : "Sign In"}
|
|
119
|
+
</Button>
|
|
120
|
+
)}
|
|
121
|
+
</form.Subscribe>
|
|
122
|
+
</form>
|
|
127
123
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
124
|
+
<div className="mt-4 text-center">
|
|
125
|
+
<Button
|
|
126
|
+
variant="link"
|
|
127
|
+
onClick={onSwitchToSignUp}
|
|
128
|
+
className="text-indigo-600 hover:text-indigo-800"
|
|
129
|
+
>
|
|
130
|
+
Need an account? Sign Up
|
|
131
|
+
</Button>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
);
|
|
139
135
|
}
|
|
@@ -8,157 +8,153 @@ import { Button } from "./ui/button";
|
|
|
8
8
|
import { Input } from "./ui/input";
|
|
9
9
|
import { Label } from "./ui/label";
|
|
10
10
|
|
|
11
|
-
export default function SignUpForm({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
})
|
|
16
|
-
const navigate = useNavigate({
|
|
17
|
-
from: "/",
|
|
18
|
-
});
|
|
19
|
-
const { isPending } = authClient.useSession();
|
|
11
|
+
export default function SignUpForm({ onSwitchToSignIn }: { onSwitchToSignIn: () => void }) {
|
|
12
|
+
const navigate = useNavigate({
|
|
13
|
+
from: "/",
|
|
14
|
+
});
|
|
15
|
+
const { isPending } = authClient.useSession();
|
|
20
16
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
17
|
+
const form = useForm({
|
|
18
|
+
defaultValues: {
|
|
19
|
+
email: "",
|
|
20
|
+
password: "",
|
|
21
|
+
name: "",
|
|
22
|
+
},
|
|
23
|
+
onSubmit: async ({ value }) => {
|
|
24
|
+
await authClient.signUp.email(
|
|
25
|
+
{
|
|
26
|
+
email: value.email,
|
|
27
|
+
password: value.password,
|
|
28
|
+
name: value.name,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
onSuccess: () => {
|
|
32
|
+
navigate({
|
|
33
|
+
to: "/dashboard",
|
|
34
|
+
});
|
|
35
|
+
toast.success("Sign up successful");
|
|
36
|
+
},
|
|
37
|
+
onError: (error) => {
|
|
38
|
+
toast.error(error.error.message || error.error.statusText);
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
);
|
|
42
|
+
},
|
|
43
|
+
validators: {
|
|
44
|
+
onSubmit: z.object({
|
|
45
|
+
name: z.string().min(2, "Name must be at least 2 characters"),
|
|
46
|
+
email: z.email("Invalid email address"),
|
|
47
|
+
password: z.string().min(8, "Password must be at least 8 characters"),
|
|
48
|
+
}),
|
|
49
|
+
},
|
|
50
|
+
});
|
|
55
51
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
if (isPending) {
|
|
53
|
+
return <Loader />;
|
|
54
|
+
}
|
|
59
55
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
return (
|
|
57
|
+
<div className="mx-auto w-full mt-10 max-w-md p-6">
|
|
58
|
+
<h1 className="mb-6 text-center text-3xl font-bold">Create Account</h1>
|
|
63
59
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
60
|
+
<form
|
|
61
|
+
onSubmit={(e) => {
|
|
62
|
+
e.preventDefault();
|
|
63
|
+
e.stopPropagation();
|
|
64
|
+
form.handleSubmit();
|
|
65
|
+
}}
|
|
66
|
+
className="space-y-4"
|
|
67
|
+
>
|
|
68
|
+
<div>
|
|
69
|
+
<form.Field name="name">
|
|
70
|
+
{(field) => (
|
|
71
|
+
<div className="space-y-2">
|
|
72
|
+
<Label htmlFor={field.name}>Name</Label>
|
|
73
|
+
<Input
|
|
74
|
+
id={field.name}
|
|
75
|
+
name={field.name}
|
|
76
|
+
value={field.state.value}
|
|
77
|
+
onBlur={field.handleBlur}
|
|
78
|
+
onChange={(e) => field.handleChange(e.target.value)}
|
|
79
|
+
/>
|
|
80
|
+
{field.state.meta.errors.map((error) => (
|
|
81
|
+
<p key={error?.message} className="text-red-500">
|
|
82
|
+
{error?.message}
|
|
83
|
+
</p>
|
|
84
|
+
))}
|
|
85
|
+
</div>
|
|
86
|
+
)}
|
|
87
|
+
</form.Field>
|
|
88
|
+
</div>
|
|
93
89
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
90
|
+
<div>
|
|
91
|
+
<form.Field name="email">
|
|
92
|
+
{(field) => (
|
|
93
|
+
<div className="space-y-2">
|
|
94
|
+
<Label htmlFor={field.name}>Email</Label>
|
|
95
|
+
<Input
|
|
96
|
+
id={field.name}
|
|
97
|
+
name={field.name}
|
|
98
|
+
type="email"
|
|
99
|
+
value={field.state.value}
|
|
100
|
+
onBlur={field.handleBlur}
|
|
101
|
+
onChange={(e) => field.handleChange(e.target.value)}
|
|
102
|
+
/>
|
|
103
|
+
{field.state.meta.errors.map((error) => (
|
|
104
|
+
<p key={error?.message} className="text-red-500">
|
|
105
|
+
{error?.message}
|
|
106
|
+
</p>
|
|
107
|
+
))}
|
|
108
|
+
</div>
|
|
109
|
+
)}
|
|
110
|
+
</form.Field>
|
|
111
|
+
</div>
|
|
116
112
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
113
|
+
<div>
|
|
114
|
+
<form.Field name="password">
|
|
115
|
+
{(field) => (
|
|
116
|
+
<div className="space-y-2">
|
|
117
|
+
<Label htmlFor={field.name}>Password</Label>
|
|
118
|
+
<Input
|
|
119
|
+
id={field.name}
|
|
120
|
+
name={field.name}
|
|
121
|
+
type="password"
|
|
122
|
+
value={field.state.value}
|
|
123
|
+
onBlur={field.handleBlur}
|
|
124
|
+
onChange={(e) => field.handleChange(e.target.value)}
|
|
125
|
+
/>
|
|
126
|
+
{field.state.meta.errors.map((error) => (
|
|
127
|
+
<p key={error?.message} className="text-red-500">
|
|
128
|
+
{error?.message}
|
|
129
|
+
</p>
|
|
130
|
+
))}
|
|
131
|
+
</div>
|
|
132
|
+
)}
|
|
133
|
+
</form.Field>
|
|
134
|
+
</div>
|
|
139
135
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
136
|
+
<form.Subscribe>
|
|
137
|
+
{(state) => (
|
|
138
|
+
<Button
|
|
139
|
+
type="submit"
|
|
140
|
+
className="w-full"
|
|
141
|
+
disabled={!state.canSubmit || state.isSubmitting}
|
|
142
|
+
>
|
|
143
|
+
{state.isSubmitting ? "Submitting..." : "Sign Up"}
|
|
144
|
+
</Button>
|
|
145
|
+
)}
|
|
146
|
+
</form.Subscribe>
|
|
147
|
+
</form>
|
|
152
148
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
149
|
+
<div className="mt-4 text-center">
|
|
150
|
+
<Button
|
|
151
|
+
variant="link"
|
|
152
|
+
onClick={onSwitchToSignIn}
|
|
153
|
+
className="text-indigo-600 hover:text-indigo-800"
|
|
154
|
+
>
|
|
155
|
+
Already have an account? Sign In
|
|
156
|
+
</Button>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
);
|
|
164
160
|
}
|
|
@@ -4,11 +4,7 @@ import { useNavigate } from "@tanstack/solid-router";
|
|
|
4
4
|
import z from "zod";
|
|
5
5
|
import { For } from "solid-js";
|
|
6
6
|
|
|
7
|
-
export default function SignInForm({
|
|
8
|
-
onSwitchToSignUp,
|
|
9
|
-
}: {
|
|
10
|
-
onSwitchToSignUp: () => void;
|
|
11
|
-
}) {
|
|
7
|
+
export default function SignInForm({ onSwitchToSignUp }: { onSwitchToSignUp: () => void }) {
|
|
12
8
|
const navigate = useNavigate({
|
|
13
9
|
from: "/",
|
|
14
10
|
});
|
|
@@ -72,9 +68,7 @@ export default function SignInForm({
|
|
|
72
68
|
class="w-full rounded border p-2"
|
|
73
69
|
/>
|
|
74
70
|
<For each={field().state.meta.errors}>
|
|
75
|
-
{(error) =>
|
|
76
|
-
<p class="text-sm text-red-600">{error?.message}</p>
|
|
77
|
-
)}
|
|
71
|
+
{(error) => <p class="text-sm text-red-600">{error?.message}</p>}
|
|
78
72
|
</For>
|
|
79
73
|
</div>
|
|
80
74
|
)}
|
|
@@ -96,9 +90,7 @@ export default function SignInForm({
|
|
|
96
90
|
class="w-full rounded border p-2"
|
|
97
91
|
/>
|
|
98
92
|
<For each={field().state.meta.errors}>
|
|
99
|
-
{(error) =>
|
|
100
|
-
<p class="text-sm text-red-600">{error?.message}</p>
|
|
101
|
-
)}
|
|
93
|
+
{(error) => <p class="text-sm text-red-600">{error?.message}</p>}
|
|
102
94
|
</For>
|
|
103
95
|
</div>
|
|
104
96
|
)}
|
|
@@ -4,11 +4,7 @@ import { useNavigate } from "@tanstack/solid-router";
|
|
|
4
4
|
import z from "zod";
|
|
5
5
|
import { For } from "solid-js";
|
|
6
6
|
|
|
7
|
-
export default function SignUpForm({
|
|
8
|
-
onSwitchToSignIn,
|
|
9
|
-
}: {
|
|
10
|
-
onSwitchToSignIn: () => void;
|
|
11
|
-
}) {
|
|
7
|
+
export default function SignUpForm({ onSwitchToSignIn }: { onSwitchToSignIn: () => void }) {
|
|
12
8
|
const navigate = useNavigate({
|
|
13
9
|
from: "/",
|
|
14
10
|
});
|
|
@@ -74,9 +70,7 @@ export default function SignUpForm({
|
|
|
74
70
|
class="w-full rounded border p-2"
|
|
75
71
|
/>
|
|
76
72
|
<For each={field().state.meta.errors}>
|
|
77
|
-
{(error) =>
|
|
78
|
-
<p class="text-sm text-red-600">{error?.message}</p>
|
|
79
|
-
)}
|
|
73
|
+
{(error) => <p class="text-sm text-red-600">{error?.message}</p>}
|
|
80
74
|
</For>
|
|
81
75
|
</div>
|
|
82
76
|
)}
|
|
@@ -98,9 +92,7 @@ export default function SignUpForm({
|
|
|
98
92
|
class="w-full rounded border p-2"
|
|
99
93
|
/>
|
|
100
94
|
<For each={field().state.meta.errors}>
|
|
101
|
-
{(error) =>
|
|
102
|
-
<p class="text-sm text-red-600">{error?.message}</p>
|
|
103
|
-
)}
|
|
95
|
+
{(error) => <p class="text-sm text-red-600">{error?.message}</p>}
|
|
104
96
|
</For>
|
|
105
97
|
</div>
|
|
106
98
|
)}
|
|
@@ -122,9 +114,7 @@ export default function SignUpForm({
|
|
|
122
114
|
class="w-full rounded border p-2"
|
|
123
115
|
/>
|
|
124
116
|
<For each={field().state.meta.errors}>
|
|
125
|
-
{(error) =>
|
|
126
|
-
<p class="text-sm text-red-600">{error?.message}</p>
|
|
127
|
-
)}
|
|
117
|
+
{(error) => <p class="text-sm text-red-600">{error?.message}</p>}
|
|
128
118
|
</For>
|
|
129
119
|
</div>
|
|
130
120
|
)}
|