Skip to content

Commit

Permalink
fix typescript errors
Browse files Browse the repository at this point in the history
  • Loading branch information
EwanLyon committed Jun 8, 2023
1 parent f05f982 commit 66601bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/nextjs/pages/ASM2023/shirt-size.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const Shirt = () => {
pause: !auth.ready || !auth?.sessionData?.id,
});

async function updateShirtSize(index) {
async function updateShirtSize(index: number) {
if (!auth.ready) {
console.error("Tried to generate tickets but auth was not ready");
return;
Expand All @@ -60,10 +60,10 @@ const Shirt = () => {
}

const shirtsNeedingSizes =
(profileQueryRes.data?.user.shirts.filter((shirt) => shirt.notes[0] == "#") as Record<string, any>[]) ?? [];
(profileQueryRes.data?.user.shirts.filter((shirt: Record<string, any>) => shirt.notes[0] == "#") as Record<string, any>[]) ?? [];
console.log(shirtsNeedingSizes);

function handleSizeChange(index, size) {
function handleSizeChange(index: number, size: string) {
let nextSizes = shirtSize;

if (nextSizes.length < shirtsNeedingSizes.reduce((acc, cur) => acc + parseInt(cur.notes[1], 10), 0)) {
Expand Down

0 comments on commit 66601bc

Please sign in to comment.