Skip to content

Commit

Permalink
lint fixes after react router upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
jonesmac committed Dec 18, 2024
1 parent 1d5ecf4 commit e882e30
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const BoundWitnessBoxWithAddressRouter = forwardRef<HTMLDivElement, Bound
const [listenerRef] = useEvent<HTMLDivElement>((noun, _verb, data) => {
if (noun === 'address' && data) {
clearHistory?.()
navigate(`${baseRoute}/${data}`)
void navigate(`${baseRoute}/${data}`)
}
}, sharedRef)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ export const FullWidthCard: React.FC<FullWidthCardProps> = ({

const localRouteChange = (to: To | undefined) => {
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
to ? navigate(to) : navigate('/404')
to ? void navigate(to) : void navigate('/404')
}
const externalRouteChange = (href: string | undefined) => {
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
href ? window.open(href) : navigate('/404')
href ? void window.open(href) : void navigate('/404')
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ export const SimpleCard: React.FC<SimpleCardProps> = ({
const isMobile = useIsMobile()
const localRouteChange = (to: To | undefined) => {
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
to ? navigate(to) : navigate('/404')
to ? void navigate(to) : void navigate('/404')
}
const externalRouteChange = (href: string | undefined) => {
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
href ? window.open(href) : navigate('/404')
href ? void window.open(href) : void navigate('/404')
}
return (
<CardEx
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const ListItemButtonExTo: React.FC<ListItemButtonExProps> = ({
const localOnClick = (event: MouseEvent<HTMLDivElement>) => {
onClick?.(event)
if (to) {
navigate(to, toOptions)
void navigate(to, toOptions)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const ReflectionTreeViewer: React.FC<ReflectionTreeViewerProps> = ({
label={childReflection.name}
onClick={() => {
const hash = `#${childReflection.name}`
navigate({ hash })
void navigate({ hash })
document.querySelector(hash)?.scrollIntoView({ behavior: 'smooth' })
}}
/>
Expand Down

0 comments on commit e882e30

Please sign in to comment.