From d6295910302d6b647e6bfea5036f4e55cf413862 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Fri, 17 Apr 2026 16:52:25 +0000 Subject: [PATCH] Changes Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com> --- src/routeTree.gen.ts | 51 ++++++++++++++++++++++++++++++++++++++++--- src/routes/login.tsx | 21 ++++++++++++++++++ src/routes/signup.tsx | 38 ++++++++++++++++++++++++++++++++ 3 files changed, 107 insertions(+), 3 deletions(-) create mode 100644 src/routes/login.tsx create mode 100644 src/routes/signup.tsx diff --git a/src/routeTree.gen.ts b/src/routeTree.gen.ts index d204c26..12a2b3f 100644 --- a/src/routeTree.gen.ts +++ b/src/routeTree.gen.ts @@ -9,8 +9,20 @@ // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. import { Route as rootRouteImport } from './routes/__root' +import { Route as SignupRouteImport } from './routes/signup' +import { Route as LoginRouteImport } from './routes/login' import { Route as IndexRouteImport } from './routes/index' +const SignupRoute = SignupRouteImport.update({ + id: '/signup', + path: '/signup', + getParentRoute: () => rootRouteImport, +} as any) +const LoginRoute = LoginRouteImport.update({ + id: '/login', + path: '/login', + getParentRoute: () => rootRouteImport, +} as any) const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', @@ -19,28 +31,50 @@ const IndexRoute = IndexRouteImport.update({ export interface FileRoutesByFullPath { '/': typeof IndexRoute + '/login': typeof LoginRoute + '/signup': typeof SignupRoute } export interface FileRoutesByTo { '/': typeof IndexRoute + '/login': typeof LoginRoute + '/signup': typeof SignupRoute } export interface FileRoutesById { __root__: typeof rootRouteImport '/': typeof IndexRoute + '/login': typeof LoginRoute + '/signup': typeof SignupRoute } export interface FileRouteTypes { fileRoutesByFullPath: FileRoutesByFullPath - fullPaths: '/' + fullPaths: '/' | '/login' | '/signup' fileRoutesByTo: FileRoutesByTo - to: '/' - id: '__root__' | '/' + to: '/' | '/login' | '/signup' + id: '__root__' | '/' | '/login' | '/signup' fileRoutesById: FileRoutesById } export interface RootRouteChildren { IndexRoute: typeof IndexRoute + LoginRoute: typeof LoginRoute + SignupRoute: typeof SignupRoute } declare module '@tanstack/react-router' { interface FileRoutesByPath { + '/signup': { + id: '/signup' + path: '/signup' + fullPath: '/signup' + preLoaderRoute: typeof SignupRouteImport + parentRoute: typeof rootRouteImport + } + '/login': { + id: '/login' + path: '/login' + fullPath: '/login' + preLoaderRoute: typeof LoginRouteImport + parentRoute: typeof rootRouteImport + } '/': { id: '/' path: '/' @@ -53,7 +87,18 @@ declare module '@tanstack/react-router' { const rootRouteChildren: RootRouteChildren = { IndexRoute: IndexRoute, + LoginRoute: LoginRoute, + SignupRoute: SignupRoute, } export const routeTree = rootRouteImport ._addFileChildren(rootRouteChildren) ._addFileTypes() + +import type { getRouter } from './router.tsx' +import type { createStart } from '@tanstack/react-start' +declare module '@tanstack/react-start' { + interface Register { + ssr: true + router: Awaited> + } +} diff --git a/src/routes/login.tsx b/src/routes/login.tsx new file mode 100644 index 0000000..8f48862 --- /dev/null +++ b/src/routes/login.tsx @@ -0,0 +1,21 @@ +import { createFileRoute, Link } from "@tanstack/react-router"; +import { Logo } from "@/components/mika/Logo"; + +export const Route = createFileRoute("/login")({ + component: LoginPlaceholder, +}); + +function LoginPlaceholder() { + return ( +
+
+ +

Login

+

+ A página de login completa será implementada na Etapa 2 (Auth + Supabase). +

+ ← Voltar para o início +
+
+ ); +} diff --git a/src/routes/signup.tsx b/src/routes/signup.tsx new file mode 100644 index 0000000..848ccdd --- /dev/null +++ b/src/routes/signup.tsx @@ -0,0 +1,38 @@ +import { createFileRoute, Link } from "@tanstack/react-router"; +import { Logo } from "@/components/mika/Logo"; + +type SignupSearch = { + plan?: string; + cycle?: "monthly" | "yearly"; +}; + +export const Route = createFileRoute("/signup")({ + validateSearch: (search: Record): SignupSearch => ({ + plan: typeof search.plan === "string" ? search.plan : undefined, + cycle: search.cycle === "yearly" || search.cycle === "monthly" ? search.cycle : undefined, + }), + component: SignupPlaceholder, +}); + +function SignupPlaceholder() { + const { plan, cycle } = Route.useSearch(); + return ( +
+
+ +

Criar conta

+

+ Cadastro completo será implementado na Etapa 2. +

+ {plan && ( +

+ Plano selecionado: {plan} · {cycle === "yearly" ? "anual" : "mensal"} +

+ )} +
+ ← Voltar para o início +
+
+
+ ); +}