Skip to content

Commit

Permalink
fix weird typescript bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
EwanLyon committed Jun 29, 2024
1 parent 63a36e6 commit c48da53
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 18 deletions.
17 changes: 6 additions & 11 deletions apps/nextjs/components/Ticket/TicketSale.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,7 @@ export function TicketProduct() {

setGenTicketLoading(true);
const res = await fetch(
`/api/create_bank_ticket?account=${
auth.ready ? auth?.sessionData?.id : ""
}&tickets=1&event=ASM2024`,
`/api/create_bank_ticket?account=${auth.ready ? auth?.sessionData?.id : ""}&tickets=1&event=ASM2024`,
);

if (res.status === 200) {
Expand All @@ -139,16 +137,14 @@ export function TicketProduct() {

return (
<div className={styles.product}>
<Image
alt="A mosaic of images taken from ASM2023"
src={ASM2024Tickets}
className={styles.productImage}
/>
<Image alt="A mosaic of images taken from ASM2023" src={ASM2024Tickets} className={styles.productImage} />
<div className={styles.information}>
<section>
<h2>Ticket Information</h2>
<p>Ticket to ASM2024 taking place in Adelaide, July 16-21.</p>
<p>Ticket price: <b>${TICKET_PRICE} AUD</b>.</p>
<p>
Ticket price: <b>${TICKET_PRICE} AUD</b>.
</p>
<p>
All attendees, including runners and staff must purchase tickets to attend the event. Volunteers
will receive a $15 rebate administered on site at ASM2024.
Expand Down Expand Up @@ -189,8 +185,7 @@ export function TicketProduct() {
fullWidth
disabled={disableBank}
onClick={generateTickets}>
Generate Ticket $
{TICKET_PRICE}
Generate Ticket ${TICKET_PRICE}
</Button>
</div>
{bankTicketsData?.error && (
Expand Down
4 changes: 2 additions & 2 deletions apps/nextjs/pages/user/[username].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ export default function ProfilePage(ssrData: ServerSideProps) {
<Box>
<Tabs
value={submissionTab}
onChange={(_e, newVal) =>
onChange={(_e: any, newVal: number) =>
setSubmissionTab(newVal)
}
aria-label="basic tabs example">
Expand Down Expand Up @@ -463,7 +463,7 @@ export default function ProfilePage(ssrData: ServerSideProps) {
<Box>
<Tabs
value={eventTab}
onChange={(_e, newVal) => setEventTab(newVal)}
onChange={(_e: any, newVal: number) => setEventTab(newVal)}
variant="scrollable">
{allRunEvents.reverse().map((event) => (
<Tab label={event} key={event} />
Expand Down
30 changes: 26 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"sass": "^1.77.1",
"ts-jest": "29.1.2",
"ts-node": "^10.9.2",
"typescript": "^5.4.5",
"typescript": "^5.5.2",
"vite": "5.2.11",
"vite-tsconfig-paths": "4.3.2",
"vitest": "1.6.0"
Expand Down

0 comments on commit c48da53

Please sign in to comment.