import { useState, lazy, Suspense } from "react" import Navigation from "../components/Navigation" // Import pages as components (they render their own content but we strip their Navigation) import HabitsContent from "./Habits" import TasksContent from "./Tasks" import StatsContent from "./Stats" const tabs = [ { key: "habits", label: "Привычки", icon: "🎯" }, { key: "tasks", label: "Задачи", icon: "✅" }, { key: "stats", label: "Статистика", icon: "📊" }, ] export default function Tracker() { const [activeTab, setActiveTab] = useState("habits") return (

📊 Трекер

{tabs.map((t) => ( ))}
{activeTab === "habits" && } {activeTab === "tasks" && } {activeTab === "stats" && }
) }