Skip to content

Commit

Permalink
Run lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kanatagu committed Jan 30, 2024
1 parent 6d3dda1 commit 72351b6
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 32 deletions.
61 changes: 31 additions & 30 deletions app/components/input/input-icon-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,35 @@ type InputIconButtonProps = {
onClick?: () => void
}

export const InputIconButton = forwardRef<ChakraInputProps & InputIconButtonProps, 'input'>(
({ ariaLabel, icon: Icon, onClick, ...props }, ref) => {
const bgColor = useColorModeValue('white', 'gray.700')
const borderColor = useColorModeValue('primary.700', 'gray.500')
export const InputIconButton = forwardRef<
ChakraInputProps & InputIconButtonProps,
'input'
>(({ ariaLabel, icon: Icon, onClick, ...props }, ref) => {
const bgColor = useColorModeValue('white', 'gray.700')
const borderColor = useColorModeValue('primary.700', 'gray.500')

return (
<InputGroup minW={{ base: '100%', md: '23.75rem' }}>
<ChakraInput
ref={ref}
{...props}
borderColor={borderColor}
focusBorderColor={'primary.600'}
bgColor={bgColor}
_placeholder={{ color: 'gray.400' }}
/>
<InputRightElement>
<IconButton
aria-label={ariaLabel}
variant="unstyled"
type={onClick ? 'button' : 'submit'}
onClick={onClick}
color="primary.700"
isDisabled={props.isDisabled}
>
<Icon size="24px" />
</IconButton>
</InputRightElement>
</InputGroup>
)
}
)
return (
<InputGroup minW={{ base: '100%', md: '23.75rem' }}>
<ChakraInput
ref={ref}
{...props}
borderColor={borderColor}
focusBorderColor={'primary.600'}
bgColor={bgColor}
_placeholder={{ color: 'gray.400' }}
/>
<InputRightElement>
<IconButton
aria-label={ariaLabel}
variant="unstyled"
type={onClick ? 'button' : 'submit'}
onClick={onClick}
color="primary.700"
isDisabled={props.isDisabled}
>
<Icon size="24px" />
</IconButton>
</InputRightElement>
</InputGroup>
)
})
2 changes: 1 addition & 1 deletion app/libs/utils/date.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { zonedTimeToUtc, toDate, utcToZonedTime, format } from 'date-fns-tz'
import { toDate, utcToZonedTime, format } from 'date-fns-tz'

const TIMEZONE = 'Asia/Tokyo'

Expand Down
2 changes: 1 addition & 1 deletion app/trip/hooks/useTagCreateDelete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const useTagCreateDelete = (tagsCollectionRefetch: () => void) => {
id: id
}
})

tagsCollectionRefetch()
} catch (error) {
console.error(error)
Expand Down

0 comments on commit 72351b6

Please sign in to comment.