Skip to content

Commit

Permalink
Merge pull request #12 from ITLab-CC/chest-item-link-feature
Browse files Browse the repository at this point in the history
Added links between items and chests
  • Loading branch information
skyface753 authored Jun 20, 2024
2 parents c7d2536 + 2652999 commit 40eefd4
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 40eefd4

Please sign in to comment.