Skip to content

Commit

Permalink
Merge pull request #1241 from DillonB07/arcade-tweaks
Browse files Browse the repository at this point in the history
Re-add fulfillment information to shop page
  • Loading branch information
maxwofford committed Jun 19, 2024
2 parents 558452a + 47ce209 commit 7e8f3f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions components/arcade/prizes.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ const Prizes = ({
const parsedSubText = subtext?.replace(/\[(.*?)\]\((.*?)\)/g,
'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>')

const parsedFullName = fullName?.replace(" ", "-")

return (
<Flex
sx={{
Expand Down Expand Up @@ -129,7 +131,6 @@ const Prizes = ({
>
{cost} {link ? '🎟️' : cost == 1 ? 'ticket' : 'tickets'}
</Text>
{/*
<Text
variant="headline"
sx={{
Expand All @@ -142,14 +143,13 @@ const Prizes = ({
}
}}
onClick={() => {
document.getElementById(`${text}-info`).showModal()
document.getElementById(`${parsedFullName}-info`).showModal()
}}
>
📦
</Text>
*/}
<dialog
id={`${text}-info`}
id={`${parsedFullName}-info`}
sx={{
background: '#09AFB4',
borderRadius: '10px',
Expand All @@ -173,7 +173,7 @@ const Prizes = ({
zIndex: 2
}}
onClick={() => {
document.getElementById(`${text}-info`).close()
document.getElementById(`${parsedFullName}-info`).close()
}}
/>
<Flex
Expand Down
4 changes: 3 additions & 1 deletion pages/arcade/[userAirtableID]/shop.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ export async function getStaticProps({params}) {
shopParts().then(items => {
const availableItems = items.filter(item => item['Enabled']).map(item => ({
'Name': item['Name'] || null,
'Full Name': item['Full Name'] || null,
'Description': item['Description'] || null,
'Fulfillment Description': item['Fulfillment Description'] || null,
'Cost Hours': item['Cost Hours'] || 0,
id: item.id,
'Image URL': item['Image URL'] || null,
Expand All @@ -88,4 +90,4 @@ export async function getStaticProps({params}) {
])

return { props, revalidate: 10 }
}
}

0 comments on commit 7e8f3f1

Please sign in to comment.