Skip to content

Commit

Permalink
Added links between items and chests
Browse files Browse the repository at this point in the history
  • Loading branch information
lars285 committed Jun 20, 2024
1 parent c7d2536 commit 2652999
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions react-app/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -266,4 +266,7 @@ summary {
box-shadow: 0.375em 0.375em 0.75em #000000;
cursor: pointer;
list-style: none;
}
.chest-item-link{
text-decoration: underline;
}
6 changes: 3 additions & 3 deletions react-app/app/items/[id]/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ export default function Page({ params }) {
<li key={kiste.kiste_id}>
<PlusOrMinusButton
itemId={itemJoined.id}
chestId={kiste.kiste_id}
chestId={kiste.kiste_id}
plus={false}
callback={() => {
updateItemAnzahlAfterButtonClick(kiste, false);
}}
/>
{kiste.anzahl}x | {kiste.kiste_name}
/>
{kiste.anzahl}x | <a className='chest-item-link' href={"/kisten/" + kiste.kiste_id}>{kiste.kiste_name}</a>
<PlusOrMinusButton
itemId={itemJoined.id}
chestId={kiste.kiste_id}
Expand Down
2 changes: 1 addition & 1 deletion react-app/app/kisten/[id]/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export default function Page({ params }) {
updateItemAnzahlAfterButtonClick(item, false);
}}
/>
{item.item_name}: {item.anzahl}x
<a className='chest-item-link' href={"/items/" + item.item_id}>{item.item_name}</a>: {item.anzahl}x
<PlusOrMinusButton
chestId={kisteWithItems.id}
itemId={item.item_id}
Expand Down

0 comments on commit 2652999

Please sign in to comment.