mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
No longer export validateEmail
This commit is contained in:
parent
8bbf4d2688
commit
5671a1d7aa
@ -1,6 +1,6 @@
|
||||
/* eslint-disable @typescript-eslint/no-misused-promises */
|
||||
'use client';
|
||||
import { useStackApp, validateEmail } from "@stackframe/stack";
|
||||
import { useStackApp } from "@stackframe/stack";
|
||||
import { useState } from "react";
|
||||
|
||||
export default function CustomCredentialSignIn() {
|
||||
@ -10,10 +10,6 @@ export default function CustomCredentialSignIn() {
|
||||
const app = useStackApp();
|
||||
|
||||
const onSubmit = async () => {
|
||||
if (!validateEmail(email)) {
|
||||
setError('Please enter a valid email');
|
||||
return;
|
||||
}
|
||||
if (!password) {
|
||||
setError('Please enter your password');
|
||||
return;
|
||||
@ -33,4 +29,4 @@ export default function CustomCredentialSignIn() {
|
||||
<button onClick={onSubmit}>Sign In</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ export default function CustomOAuthSignIn() {
|
||||
|
||||
```tsx
|
||||
'use client';
|
||||
import { useStackApp, validateEmail } from "@stackframe/stack";
|
||||
import { useStackApp } from "@stackframe/stack";
|
||||
import { useState } from "react";
|
||||
|
||||
export default function CustomCredentialSignIn() {
|
||||
@ -65,10 +65,6 @@ export default function CustomCredentialSignIn() {
|
||||
const app = useStackApp();
|
||||
|
||||
const onSubmit = async () => {
|
||||
if (!validateEmail(email)) {
|
||||
setError('Please enter a valid email');
|
||||
return;
|
||||
}
|
||||
if (!password) {
|
||||
setError('Please enter your password');
|
||||
return;
|
||||
@ -89,4 +85,4 @@ export default function CustomCredentialSignIn() {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
@ -9,7 +9,6 @@ export { default as StackHandler } from "./components/StackHandler";
|
||||
export { default as EmailVerification } from "./components/EmailVerification";
|
||||
export { default as PasswordReset } from "./components/PasswordReset";
|
||||
export { default as ForgotPassword } from "./components/ForgotPassword";
|
||||
export { validateEmail } from "./utils/email";
|
||||
|
||||
// TODO we can't import it like this
|
||||
import '../dist/tailwind.css';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user