Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ローディング中のUIを実装した #142

Merged
merged 2 commits into from
Nov 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion frontend/app/routes/home/route.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AppShell, Container } from '@mantine/core';
import { AppShell, Container, LoadingOverlay } from '@mantine/core';
import {
ActionFunctionArgs,
json,
Expand Down Expand Up @@ -132,6 +132,10 @@ const Home = () => {
<HeaderComponent />
<Container size="xl">
<AppShell.Main>
<LoadingOverlay
visible={navigation.state === 'loading'}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

visible={navigation.state !== 'idle'}
の方が良くない?
action中はオーバーレイを表示しない理由ってあるかな?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

確かに!

overlayProps={{ radius: 'sm', blur: 1 }}
/>
<Outlet />
</AppShell.Main>
</Container>
Expand Down