Skip to content

Commit

Permalink
refactor(NavLoginButton): Remove unneeded 'as' prop, update Link prop…
Browse files Browse the repository at this point in the history
… type.
  • Loading branch information
binh-dam-ibigroup committed Apr 24, 2024
1 parent 68d62a7 commit 3720a29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/components/user/nav-login-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const NavLoginButton = ({
if (link.url.startsWith('http')) {
return (
<li key={link.url}>
<NavUnstyledLink as="a" href={link.url} target="_blank">
<NavUnstyledLink href={link.url} target="_blank">
<FormattedMessage id="components.NavLoginButton.help" />
<NewWindowIconA11y
size={12}
Expand Down
4 changes: 2 additions & 2 deletions lib/components/util/link.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { ComponentType, HTMLAttributes } from 'react'
import { AnchorHTMLAttributes, ComponentType } from 'react'
import { connect } from 'react-redux'

import { AppReduxState } from '../../util/state-types'
import { combineQueryParams } from '../../util/api'
import { isBlank } from '../../util/ui'

interface OwnProps extends HTMLAttributes<HTMLAnchorElement> {
interface OwnProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
to?: string
toParams?: Record<string, unknown>
/** If true, an 'active' CSS class will be applied if the URL starts the same as the `to` prop. */
Expand Down

0 comments on commit 3720a29

Please sign in to comment.