Skip to content

Commit

Permalink
feat: suspense でコンポーネントをラップした
Browse files Browse the repository at this point in the history
  • Loading branch information
RuiOkazaki committed May 10, 2024
1 parent 19f02af commit fcafb12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/shared/layout/game-mode-layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { FC, ReactNode } from 'react';
import { memo } from 'react';
import './style.css';
import { Suspense, memo } from 'react';
import './game-mode-layout.css';

type Props = {
children: ReactNode;
Expand All @@ -9,7 +9,7 @@ type Props = {
const Component: FC<Props> = ({ children }) => {
return (
<div className='-translate-x-1/2 -translate-y-1/2 fixed top-1/2 left-1/2 h-[100dvh] w-[100dvw] port:h-[100dvw] port:w-[100dvh] port:rotate-90'>
{children}
<Suspense fallback='Loading...'>{children}</Suspense>
</div>
);
};
Expand Down

0 comments on commit fcafb12

Please sign in to comment.