Remove Spinner and don't lazy-load components

This commit is contained in:
Alex Gleason 2025-06-04 09:14:44 -05:00
parent 5b90ebe482
commit f762136f14
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
3 changed files with 3 additions and 18 deletions

View File

@ -5,7 +5,6 @@ import { Suspense } from 'react';
import NostrProvider from '@/components/NostrProvider'
import { ThemeProvider } from "@/components/ThemeProvider";
import { Toaster } from "@/components/ui/toaster";
import { Spinner } from '@/components/ui/spinner';
import { Toaster as Sonner } from "@/components/ui/sonner";
import { TooltipProvider } from "@/components/ui/tooltip";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
@ -33,7 +32,7 @@ export function App() {
<TooltipProvider>
<Toaster />
<Sonner />
<Suspense fallback={<div className="bg-black flex items-center justify-center h-screen"><Spinner /></div>}>
<Suspense>
<AppRouter />
</Suspense>
</TooltipProvider>

View File

@ -1,10 +1,8 @@
import { lazy } from "react";
import { BrowserRouter, Route, Routes } from "react-router-dom";
import { ScrollToTop } from "./components/ScrollToTop";
// Lazy load page components
const Index = lazy(() => import("./pages/Index"));
const NotFound = lazy(() => import("./pages/NotFound"));
import Index from "./pages/Index";
import NotFound from "./pages/NotFound";
export function AppRouter() {
return (

View File

@ -1,12 +0,0 @@
import { cn } from '@/lib/utils';
import { Loader2 } from 'lucide-react';
const Spinner = ({ className }: { className?: string }) => {
return (
<Loader2
className={cn('my-28 h-16 w-16 text-primary/60 animate-spin', className)}
/>
);
};
export { Spinner };