feat: v2 rewrite — hexagonal arch, ActivityPub federation, NATS, deployment-ready (#1)
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled

This commit was merged in pull request #1.
This commit is contained in:
2026-05-16 09:42:40 +00:00
parent 071809bc3f
commit 9aee4ceb6d
224 changed files with 35418 additions and 1469 deletions

View File

@@ -23,6 +23,7 @@ import {
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { RegisterSchema, registerUser } from "@/lib/api";
import Cookies from "js-cookie";
import { useState } from "react";
export default function RegisterPage() {
@@ -37,9 +38,9 @@ export default function RegisterPage() {
async function onSubmit(values: z.infer<typeof RegisterSchema>) {
try {
setError(null);
await registerUser(values);
// You can automatically log the user in here or just redirect them
router.push("/login");
const { token } = await registerUser(values);
Cookies.set("auth_token", token, { expires: 7, secure: true });
router.push("/");
} catch {
setError("Username or email may already be taken.");
}