Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeKarow committed Dec 11, 2023
1 parent e658d25 commit 6f5fd68
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
14 changes: 2 additions & 12 deletions packages/ui/components/data-portal/HoursDrawer/fieldArray.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
import { DateTime, Interval } from 'luxon'
import { type Control, useFieldArray, UseFieldArrayReturn, type UseFormReturn } from 'react-hook-form'
import { type UseFormReturn } from 'react-hook-form'

import { type DayIndex, dayIndicies, type ZFormSchema } from './schema'

// export const useDayFieldArray = (control: Control<ZFormSchema>) => ({
// '0': useFieldArray({ control, name: '0' }),
// '1': useFieldArray({ control, name: '1' }),
// '2': useFieldArray({ control, name: '2' }),
// '3': useFieldArray({ control, name: '3' }),
// '4': useFieldArray({ control, name: '4' }),
// '5': useFieldArray({ control, name: '5' }),
// '6': useFieldArray({ control, name: '6' }),
// })
import { type DayIndex, type ZFormSchema } from './schema'

export const defaultInterval = (tz: string | null) => {
const interval = Interval.fromDateTimes(
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/components/data-portal/HoursDrawer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const sortedTimezoneData = timezoneData.sort((a, b) => {
})

const _HoursDrawer = forwardRef<HTMLButtonElement, HoursDrawerProps>(({ locationId, ...props }, ref) => {
const [opened, handler] = useDisclosure(true) //TODO: Change back to 'false' when done.
const [opened, handler] = useDisclosure(false)
const [isSaved, setIsSaved] = useState(false)

Check warning on line 75 in packages/ui/components/data-portal/HoursDrawer/index.tsx

View check run for this annotation

InReachBot / Check Code for Errors

packages/ui/components/data-portal/HoursDrawer/index.tsx#L75

[@typescript-eslint/no-unused-vars] 'setIsSaved' is assigned a value but never used. Allowed unused elements of array destructuring patterns must match /^_/u.
const [globalTz, setGlobalTz] = useState<string | null>(null)
// const [initialData, setInitialData] = useState<ZFormSchema | null>(null)
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/modals/UserSurvey/fields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export const FormCountry = () => {
const { t } = useTranslation(['common', 'country'])
const { classes } = useStyles()
const form = useUserSurveyFormContext()
console.log(selectOptions)

const handleCountrySelect = (event: string) => {
form.setFieldValue('countryOriginId', event)
}
Expand Down

0 comments on commit 6f5fd68

Please sign in to comment.