Skip to content

Commit

Permalink
Minor bundle size optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
brundonsmith committed Nov 10, 2023
1 parent ca53473 commit dea6f98
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion front-end/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"statics": "mkdir -p out/ && cp public/* out/",
"dev": "npm run statics && sass src/index.scss out/app.css --watch & node build.js --watch & tsc --watch & npm run serve",
"check": "eslint . && tsc",
"build": "npm run check && npm run statics && npx sass src/index.scss out/app.css && node build.js --minify",
"build": "npm run check && npm run statics && npx sass src/index.scss out/app.css --style=compressed && node build.js --minify",
"serve": "http-server out"
},
"dependencies": {
Expand Down
44 changes: 22 additions & 22 deletions front-end/src/components/AttendeeInfoForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,25 +203,25 @@ const VOLUNTEER_OPTIONS = [
}))
] as const

const DIET_OPTIONS = [
{ value: null, label: 'No restrictions' },
...TABLE_ROWS.diet
.map(diet => ({
value: diet.diet_id,
label: diet.description
}))
]

const ALLERGIES = [
'milk',
'eggs',
'fish',
'shellfish',
'tree_nuts',
'peanuts',
'wheat',
'soy'
] as const

const capitalize = (str: string) => str[0]?.toUpperCase() + str.substring(1)
const snakeCaseToSpaces = (str: string) => str.replaceAll('_', ' ')
// const DIET_OPTIONS = [
// { value: null, label: 'No restrictions' },
// ...TABLE_ROWS.diet
// .map(diet => ({
// value: diet.diet_id,
// label: diet.description
// }))
// ]

// const ALLERGIES = [
// 'milk',
// 'eggs',
// 'fish',
// 'shellfish',
// 'tree_nuts',
// 'peanuts',
// 'wheat',
// 'soy'
// ] as const

// const capitalize = (str: string) => str[0]?.toUpperCase() + str.substring(1)
// const snakeCaseToSpaces = (str: string) => str.replaceAll('_', ' ')

0 comments on commit dea6f98

Please sign in to comment.