diff --git a/apps/web/src/app/(auth)/layout.tsx b/apps/web/src/app/(auth)/layout.tsx index 063f0ad..322c85d 100644 --- a/apps/web/src/app/(auth)/layout.tsx +++ b/apps/web/src/app/(auth)/layout.tsx @@ -1,9 +1,13 @@ +import { AuthHeader } from '@/components/AuthHeader'; import type { ReactNode } from 'react'; export default function AuthLayout({ children }: { children: ReactNode }) { return ( -
-
{children}
+
+ +
+
{children}
+
); } diff --git a/apps/web/src/components/AuthHeader.tsx b/apps/web/src/components/AuthHeader.tsx new file mode 100644 index 0000000..ecd53f2 --- /dev/null +++ b/apps/web/src/components/AuthHeader.tsx @@ -0,0 +1,66 @@ +'use client'; + +import { Button } from '@tpmjs/ui/Button/Button'; +import { Header } from '@tpmjs/ui/Header/Header'; +import Link from 'next/link'; +import { usePathname } from 'next/navigation'; + +/** + * Minimal header for auth pages (sign-in, sign-up, verify-email) + * Shows logo on left, contextual auth link on right + */ +export function AuthHeader(): React.ReactElement { + const pathname = usePathname(); + const isSignIn = pathname === '/sign-in'; + const isSignUp = pathname === '/sign-up'; + + return ( +
+ TPMJS + + } + size="md" + sticky={true} + actions={ +
+ {isSignIn && ( + <> + + Don't have an account? + + + + + + )} + {isSignUp && ( + <> + + Already have an account? + + + + + + )} + {!isSignIn && !isSignUp && ( + + + + )} +
+ } + /> + ); +}