re-add fulfillment info to shop page

This commit is contained in:
Dillon Barnes 2024-06-18 13:05:16 +01:00
parent 9bcf5f857d
commit c74e160b02
No known key found for this signature in database
2 changed files with 9 additions and 6 deletions

View file

@ -25,6 +25,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={{
@ -122,7 +124,6 @@ const Prizes = ({
>
{cost} {link ? '🎟️' : cost == 1 ? 'ticket' : 'tickets'}
</Text>
{/*
<Text
variant="headline"
sx={{
@ -135,14 +136,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',
@ -166,7 +166,7 @@ const Prizes = ({
zIndex: 2
}}
onClick={() => {
document.getElementById(`${text}-info`).close()
document.getElementById(`${parsedFullName}-info`).close()
}}
/>
<Flex

View file

@ -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,
@ -88,4 +90,5 @@ export async function getStaticProps({params}) {
])
return { props }
}
}