import React, { useState, useEffect, useCallback, Suspense, lazy } from "react"; import { ArrowRight } from "lucide-react"; import { useAuth } from "./hooks/useAuth"; import { useSearch } from "./hooks/useSearch"; import { useFollow } from "./hooks/useFollows"; import { useFileUpload } from "./hooks/useFileUpload"; import { useTheme } from "./hooks/useTheme"; import { useNotifications } from "./hooks/useNotifications"; import Firefly from "./components/Firefly"; import NotificationContainer from "./components/common/NotificationContainer"; import ErrorBoundary from "./components/common/ErrorBoundary"; import AriaLiveAnnouncer from "./components/common/AriaLiveAnnouncer"; import { SearchResultSkeleton } from "./components/common/LoadingSkeleton"; import { DEFAULT_SETTINGS } from "./types/settings"; import type { UserSettings, SearchResult } from "./types"; import { apiClient } from "./lib/api/client"; import { ATPROTO_APPS } from "./config/atprotoApps"; import { useSettingsStore } from "./stores/useSettingsStore"; // Lazy load page components const LoginPage = lazy(() => import("./pages/Login")); const HomePage = lazy(() => import("./pages/Home")); const LoadingPage = lazy(() => import("./pages/Loading")); const ResultsPage = lazy(() => import("./pages/Results")); // Loading fallback component const PageLoader: React.FC = () => (