🐛 menu arrows sometimes not showing

This commit is contained in:
Chase Manning 2023-10-01 22:40:50 +01:00
commit 6715778e2f
2 changed files with 6 additions and 11 deletions
TODO.md
src/components

View file

@ -1,7 +1,5 @@
===========
- Selection indicator not showing for pokemon button
- Remove encounter status after killing
- Store in state which trainers we have beaten
- Make sure we can't walk into trainers
- Add support for app refreshing when there is an update

View file

@ -57,7 +57,8 @@ const Bold = styled.div`
const ArrowContainer = styled.div`
position: absolute;
left: 0;
top: -1px;
top: 50%;
transform: translateY(-50%);
@media (max-width: 768px) {
top: auto;
@ -239,7 +240,7 @@ const Menu = ({
]
).map((item: MenuItemType, index: number) => {
return (
<li key={index}>
<li key={index} style={{ position: "relative" }}>
<Button
className={`${noSelect ? "no-select-button" : ""} ${
item.pokemon ? "pokemon" : ""
@ -248,14 +249,10 @@ const Menu = ({
>
{item.label}
{item.value !== undefined && <Bold>{item.value}</Bold>}
<ArrowContainer>
<Arrow
disabled={disabled}
menu
show={activeIndex === index}
/>
</ArrowContainer>
</Button>
<ArrowContainer>
<Arrow disabled={disabled} menu show={activeIndex === index} />
</ArrowContainer>
</li>
);
})}