- {props.eat
+ {eat
? (() => {
switch (emoId) {
//嬉
@@ -39,7 +49,10 @@ const Eat: FC
= (props) => {
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center',
- zIndex: 1,
+ zIndex: 2,
+ position: 'absolute',
+ left: `${grassLeft}px`,
+ top: `${grassTop}px`,
}}
/>
) : (
@@ -51,7 +64,10 @@ const Eat: FC = (props) => {
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center',
- zIndex: 1,
+ zIndex: 2,
+ position: 'absolute',
+ left: `${grassLeft}px`,
+ top: `${grassTop}px`,
}}
/>
);
@@ -66,7 +82,10 @@ const Eat: FC = (props) => {
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center',
- zIndex: 1,
+ zIndex: 2,
+ position: 'absolute',
+ left: `${grassLeft}px`,
+ top: `${grassTop}px`,
}}
/>
) : (
@@ -78,7 +97,10 @@ const Eat: FC = (props) => {
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center',
- zIndex: 1,
+ zIndex: 2,
+ position: 'absolute',
+ left: `${grassLeft}px`,
+ top: `${grassTop}px`,
}}
/>
);
@@ -93,7 +115,10 @@ const Eat: FC = (props) => {
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center',
- zIndex: 1,
+ zIndex: 2,
+ position: 'absolute',
+ left: `${grassLeft}px`,
+ top: `${grassTop}px`,
}}
/>
) : (
@@ -105,7 +130,10 @@ const Eat: FC = (props) => {
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center',
- zIndex: 1,
+ zIndex: 2,
+ position: 'absolute',
+ left: `${grassLeft}px`,
+ top: `${grassTop}px`,
}}
/>
);
@@ -120,7 +148,10 @@ const Eat: FC = (props) => {
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center',
- zIndex: 1,
+ zIndex: 2,
+ position: 'absolute',
+ left: `${grassLeft}px`,
+ top: `${grassTop}px`,
}}
/>
) : (
@@ -132,7 +163,10 @@ const Eat: FC = (props) => {
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center',
- zIndex: 1,
+ zIndex: 2,
+ position: 'absolute',
+ left: `${grassLeft}px`,
+ top: `${grassTop}px`,
}}
/>
);
@@ -141,8 +175,8 @@ const Eat: FC = (props) => {
}
})()
: null}
- {props.eat ? (
- props.showImage ? (
+ {eat ? (
+ showImage ? (
= (props) => {
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center',
- marginTop: '-130px',
- marginLeft: '25px',
- zIndex: -1,
+ left: `${position.x}px`,
+ top: `${position.y}px`,
+ zIndex: 1,
}}
/>
) : (
= (props) => {
- const isDispPop = props.pop && props.evoPop;
+const EvolutionPopup: FC = ({ eatCount, pop, evolution, evoPop }) => {
+ const isDispPop = pop && evoPop;
return (
{isDispPop ? (
- {props.eatCount > EATLIMIT ? (
+ {eatCount > EATLIMIT ? (
= (props) => {