diff --git a/src/app/api/logout/route.ts b/src/app/api/logout/route.ts new file mode 100644 index 0000000..ba89440 --- /dev/null +++ b/src/app/api/logout/route.ts @@ -0,0 +1,8 @@ +import { signOut } from '@/auth'; +import { NextResponse } from 'next/server'; + +export const GET = async () => { + await signOut(); + + return NextResponse.redirect('/login'); +}; diff --git a/src/components/custom-ui/labeled-input.tsx b/src/components/custom-ui/labeled-input.tsx index 23601d9..5ea9caf 100644 --- a/src/components/custom-ui/labeled-input.tsx +++ b/src/components/custom-ui/labeled-input.tsx @@ -8,6 +8,7 @@ import { cn } from '@/lib/utils'; export default function LabeledInput({ type, label, + subtext, placeholder, value, name, @@ -16,8 +17,8 @@ export default function LabeledInput({ error, ...rest }: { - type: 'text' | 'email' | 'password' | 'file'; label: string; + subtext?: string; placeholder?: string; value?: string; name?: string; @@ -30,6 +31,11 @@ export default function LabeledInput({ return (
+ {subtext && ( + + )} {variantSize === 'textarea' ? (