From 8669cf620bc5cdb5ff460272faa2fdfa4229b6f3 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Sun, 23 Feb 2025 16:20:02 +0100 Subject: [PATCH] Fixed Colors and HorizontalNav --- .../app/(auth)/login/_components/Login.tsx | 48 +++++++++---------- apps/hub/app/_components/Nav.tsx | 8 ++-- 2 files changed, 27 insertions(+), 29 deletions(-) diff --git a/apps/hub/app/(auth)/login/_components/Login.tsx b/apps/hub/app/(auth)/login/_components/Login.tsx index d63bec3c..7acc39eb 100644 --- a/apps/hub/app/(auth)/login/_components/Login.tsx +++ b/apps/hub/app/(auth)/login/_components/Login.tsx @@ -1,12 +1,12 @@ -'use client'; -import { zodResolver } from '@hookform/resolvers/zod'; -import { signIn } from 'next-auth/react'; -import Link from 'next/link'; -import { redirect, useSearchParams } from 'next/navigation'; -import { useState } from 'react'; -import { useForm } from 'react-hook-form'; -import { Toaster, toast } from 'react-hot-toast'; -import { z } from 'zod'; +"use client"; +import { zodResolver } from "@hookform/resolvers/zod"; +import { signIn } from "next-auth/react"; +import Link from "next/link"; +import { redirect, useSearchParams } from "next/navigation"; +import { useState } from "react"; +import { useForm } from "react-hook-form"; +import { Toaster, toast } from "react-hot-toast"; +import { z } from "zod"; export const Login = () => { const [isLoading, setIsLoading] = useState(false); @@ -27,32 +27,30 @@ export const Login = () => { className="card-body" onSubmit={form.handleSubmit(async () => { setIsLoading(true); - const data = await signIn('credentials', { + const data = await signIn("credentials", { redirect: false, - email: form.getValues('email'), - password: form.getValues('password'), + email: form.getValues("email"), + password: form.getValues("password"), }); setIsLoading(false); if (!data || data.error) { - toast.error('E-Mail / Passwort ist falsch!', { + toast.error("E-Mail / Passwort ist falsch!", { style: { - background: - 'var(--fallback-b1, oklch(var(--b1) / var(--tw-bg-opacity, 1)))', - color: - 'var(--fallback-nc, oklch(var(--nc) / var(--tw-text-opacity, 1)))', + background: "var(--color-base-100)", + color: "var(--color-base-content)", }, }); return; } - redirect(searchParams.get('redirect') || '/'); + redirect(searchParams.get("redirect") || "/"); })} >
-

Login

+

Login

- Noch keinen Account? Zur{' '} + Noch keinen Account? Zur{" "} Registrierung @@ -70,14 +68,14 @@ export const Login = () => {

- {typeof form.formState.errors.email?.message === 'string' + {typeof form.formState.errors.email?.message === "string" ? form.formState.errors.email.message - : ''} + : ""}