Switch to vercel's biome setup (#543)
This commit is contained in:
parent
b8643353c0
commit
43aa1c6e58
52 changed files with 414 additions and 201 deletions
|
|
@ -17,7 +17,7 @@ export interface LoginActionState {
|
|||
|
||||
export const login = async (
|
||||
_: LoginActionState,
|
||||
formData: FormData
|
||||
formData: FormData,
|
||||
): Promise<LoginActionState> => {
|
||||
try {
|
||||
const validatedData = authFormSchema.parse({
|
||||
|
|
@ -53,7 +53,7 @@ export interface RegisterActionState {
|
|||
|
||||
export const register = async (
|
||||
_: RegisterActionState,
|
||||
formData: FormData
|
||||
formData: FormData,
|
||||
): Promise<RegisterActionState> => {
|
||||
try {
|
||||
const validatedData = authFormSchema.parse({
|
||||
|
|
|
|||
|
|
@ -20,12 +20,12 @@ export const {
|
|||
providers: [
|
||||
Credentials({
|
||||
credentials: {},
|
||||
// biome-ignore lint/suspicious/noExplicitAny: TODO
|
||||
async authorize({ email, password }: any) {
|
||||
const users = await getUser(email);
|
||||
if (users.length === 0) return null;
|
||||
// biome-ignore lint: Forbidden non-null assertion.
|
||||
const passwordsMatch = await compare(password, users[0].password!);
|
||||
// biome-ignore lint/suspicious/noExplicitAny: TODO
|
||||
if (!passwordsMatch) return null;
|
||||
return users[0] as any;
|
||||
},
|
||||
}),
|
||||
|
|
@ -43,7 +43,6 @@ export const {
|
|||
token,
|
||||
}: {
|
||||
session: ExtendedSession;
|
||||
// biome-ignore lint/suspicious/noExplicitAny: TODO
|
||||
token: any;
|
||||
}) {
|
||||
if (session.user) {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export default function Page() {
|
|||
login,
|
||||
{
|
||||
status: 'idle',
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export default function Page() {
|
|||
register,
|
||||
{
|
||||
status: 'idle',
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue