feat: add AuthModal component with login, register and social tabs

- Add AuthModal with login/register tabs and social buttons
- Add forgot-password and reset-password routes
- Add Sonner toaster to root layout
- Add auth search schemas to @lila/shared
- Add ESLint overrides for TanStack Router generics
This commit is contained in:
lila 2026-04-30 19:38:43 +02:00
parent 6297dff399
commit 32ee1edf80
6 changed files with 261 additions and 18 deletions

View file

@ -1,8 +1,10 @@
import { createRootRoute, Outlet } from "@tanstack/react-router";
import { TanStackRouterDevtools } from "@tanstack/react-router-devtools";
import { Toaster } from "sonner";
import Navbar from "../components/navbar/NavBar";
import NotFound from "../components/NotFound";
import RootError from "../components/RootError";
import { AuthModalSearchSchema } from "@lila/shared";
const RootLayout = () => {
return (
@ -11,6 +13,7 @@ const RootLayout = () => {
<main className="max-w-5xl mx-auto px-6 py-8">
<Outlet />
</main>
<Toaster richColors position="top-center" />
<TanStackRouterDevtools />
</>
);
@ -20,4 +23,5 @@ export const Route = createRootRoute({
component: RootLayout,
notFoundComponent: NotFound,
errorComponent: RootError,
validateSearch: AuthModalSearchSchema,
});

View file

@ -5,7 +5,7 @@ import { toast } from "sonner";
import { ResetPasswordSearchSchema } from "@lila/shared";
function ResetPasswordPage() {
const token = String(Route.useSearch().token);
const { token } = Route.useSearch();
const navigate = useNavigate();
const [password, setPassword] = useState("");
const [isPending, setIsPending] = useState(false);