Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-add fulfillment information to shop page #1241

Merged
merged 3 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }
}
}
Loading