Skip to content

Commit

Permalink
change loading screen
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaniyaps committed Jun 29, 2024
1 parent 5178406 commit e374783
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
22 changes: 22 additions & 0 deletions client/src/components/LoadingScreen.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { cn } from "@/lib/utils";

export default function LoadingScreen() {
return (
<div className="w-full h-full flex justify-center items-center">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
className={cn("animate-spin", "text-muted-foreground")}
>
<path d="M21 12a9 9 0 1 1-6.219-8.56" />
</svg>
</div>
);
}
7 changes: 0 additions & 7 deletions client/src/components/loader.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions client/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import React, { Suspense } from "react";
import ReactDOM from "react-dom/client";
import { RelayEnvironmentProvider } from "react-relay/hooks";
import { RouterProvider } from "react-router-dom";
import Loader from "./components/loader.tsx";
import LoadingScreen from "./components/LoadingScreen.tsx";
import "./index.css";
import environment from "./lib/relay-environment";
import router from "./router.tsx";

ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<RelayEnvironmentProvider environment={environment}>
<Suspense fallback={<Loader />}>
<Suspense fallback={<LoadingScreen />}>
<RouterProvider router={router} />
</Suspense>
</RelayEnvironmentProvider>
Expand Down

0 comments on commit e374783

Please sign in to comment.