diff --git a/src/components/EvolutionWalk.tsx b/src/components/EvolutionWalk.tsx index 8bfab4c..533b2b0 100644 --- a/src/components/EvolutionWalk.tsx +++ b/src/components/EvolutionWalk.tsx @@ -31,10 +31,10 @@ const EvolutionWalk: FC = ({ typeId, containerSize }) => { }); useEffect(() => { - const minX = -50; // 開始位置のx座標 - const minY = (containerSize.height / 10) * 4; // 開始位置のy座標 - const maxX = (containerSize.width / 10) * 5; // 終了位置のx座標 - const maxY = (containerSize.height / 10) * 6; // 終了位置のy座標 + const minX = 0; // 開始位置のx座標 + const minY = 0; // 開始位置のy座標 + const maxX = containerSize.width - 100; // 終了位置のx座標 + const maxY = containerSize.height - 100; // 終了位置のy座標 const updatePosition = () => { const newX = Math.floor(Math.random() * (maxX - minX + 1)) + minX; @@ -83,36 +83,27 @@ const EvolutionWalk: FC = ({ typeId, containerSize }) => { return (
- +
); }; diff --git a/src/components/NormalWalk.tsx b/src/components/NormalWalk.tsx index a99ef4e..c4e66d5 100644 --- a/src/components/NormalWalk.tsx +++ b/src/components/NormalWalk.tsx @@ -19,14 +19,14 @@ const NormalWalk: FC = ({ containerSize }) => { const walkerRef = useRef(null); const [position, setPosition] = useState({ - x: containerSize.width / 3, + x: containerSize.width / 2, y: (containerSize.height / 10) * 5, }); useEffect(() => { - const minX = -50; // 開始位置のx座標 - const minY = (containerSize.height / 10) * 4; // 開始位置のy座標 - const maxX = (containerSize.width / 10) * 5; // 終了位置のx座標 - const maxY = (containerSize.height / 10) * 6; // 終了位置のy座標 + const minX = 0; // 開始位置のx座標 + const minY = 0; // 開始位置のy座標 + const maxX = containerSize.width - 100; // 終了位置のx座標 + const maxY = containerSize.height - 100; // 終了位置のy座標 const updatePosition = () => { const newX = Math.floor(Math.random() * (maxX - minX + 1)) + minX; @@ -61,36 +61,27 @@ const NormalWalk: FC = ({ containerSize }) => { return (
- +
); }; diff --git a/src/components/PageContainer.tsx b/src/components/PageContainer.tsx index 2ed1cb7..88460c2 100644 --- a/src/components/PageContainer.tsx +++ b/src/components/PageContainer.tsx @@ -8,9 +8,10 @@ type Props = { height: number; }> ) => void; + children: React.ReactNode; }; -export const PageContainer: FC = ({ updatePageSize }) => { +export const PageContainer: FC = ({ updatePageSize, children }) => { const walkerRef = useRef(null); const updateContainerSize = useCallback(() => { @@ -43,9 +44,8 @@ export const PageContainer: FC = ({ updatePageSize }) => { }, [updateContainerSize]); return ( - + + {children} + ); }; diff --git a/src/components/costume/CostumeHeader.tsx b/src/components/costume/CostumeHeader.tsx index be78641..d8b1358 100644 --- a/src/components/costume/CostumeHeader.tsx +++ b/src/components/costume/CostumeHeader.tsx @@ -1,9 +1,6 @@ import { Grid, Typography, Button, IconButton } from '@mui/material'; -import ArrowBackIcon from '@mui/icons-material/ArrowBack'; -import { useNavigate } from 'react-router-dom'; export const CostumeHeader = () => { - const navigate = useNavigate(); return ( { const navigate = useNavigate(); diff --git a/src/pages/AppView.tsx b/src/pages/AppView.tsx index 07f2fa6..d7d70a0 100644 --- a/src/pages/AppView.tsx +++ b/src/pages/AppView.tsx @@ -157,7 +157,6 @@ export const AppView: FC = () => { return (
- { handleSubmit={handleSubmit} isDisableTextField={isDisableTextField()} /> - - - - - - {dispWalker && evoPop ? : null} - {evoWalk ? ( - - ) : null} + + + {dispWalker && evoPop ? : null} + {evoWalk ? : null} + + + + + + - - - + + diff --git a/src/pages/BattleView.tsx b/src/pages/BattleView.tsx index 3b603d5..ccfec89 100644 --- a/src/pages/BattleView.tsx +++ b/src/pages/BattleView.tsx @@ -152,7 +152,6 @@ export const BattleView: FC = () => { return (
- { handleResultChange={handleBattleresultModalOpen} isDisableTextField={isDisableTextField()} /> - - - - - - - - {dispWalker && evoPop ? : null} - {evoWalk ? ( - - ) : null} + + + {dispWalker && evoPop ? : null} + {evoWalk ? : null} + + + + + + + + + - - - + +