- Pages: login, register, tasks list, task detail - Components: TaskCard, TaskForm, GroupSelector, StatusBadge, Header - Tailwind CSS, dark/light mode, PWA manifest - Running on :3001 via systemd Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
25 lines
561 B
TypeScript
25 lines
561 B
TypeScript
"use client";
|
|
|
|
import { useEffect } from "react";
|
|
import { useRouter } from "next/navigation";
|
|
import { useAuth } from "@/lib/auth";
|
|
|
|
export default function Home() {
|
|
const { token } = useAuth();
|
|
const router = useRouter();
|
|
|
|
useEffect(() => {
|
|
if (token) {
|
|
router.replace("/tasks");
|
|
} else {
|
|
router.replace("/login");
|
|
}
|
|
}, [token, router]);
|
|
|
|
return (
|
|
<div className="flex items-center justify-center min-h-[60vh]">
|
|
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"></div>
|
|
</div>
|
|
);
|
|
}
|