Skip to content

Commit

Permalink
Merge pull request #96 from MurakawaTakuya/feat/73-loading-icon
Browse files Browse the repository at this point in the history
画面ロードのアイコンを追加
  • Loading branch information
MurakawaTakuya authored Dec 8, 2024
2 parents 5e638a7 + 94dec82 commit 4e59d2f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/Components/TopPage/TopPage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client";
import { useUser } from "@/utils/UserContext";
import CircularProgress from "@mui/joy/CircularProgress";
import { redirect } from "next/navigation";
import { ReactNode } from "react";

Expand All @@ -15,7 +16,18 @@ export const TopPage = ({ children }: TopPageProps) => {
return (
<>
{user === undefined ? (
<>ローディングぐるぐるしてるつもり</>
<CircularProgress
color="primary"
variant="soft"
size="lg"
value={30}
sx={{
position: "absolute",
top: "50%",
left: "50%",
transform: "translate(-50%, -50%)",
}}
/>
) : (
<main>{children}</main>
)}
Expand Down

0 comments on commit 4e59d2f

Please sign in to comment.