2f7b266e6b
* MP-1674: replaced the logo and added dekstop only nav * MP-1677: borrowCapacity implemented into the SubAccount Nav * MP-1677: adjusted the SubAccount navigation * M1677: fixed the button and SearchInput component * MP-1674: fixed the NavLink component * MP-1674: fixed the SubAccount navigation * tidy: cleaning up the trading view * MP-1674: added withdraw and funding functions * MP-1674: worked on the AccountStats * MP-1671: modal work * MP-1647: improvised CreditAccount expander * tidy: fixed the page structure * MP-1758: finished the SearchInput layout * MP-1759: updated the semicircle graphs * MP-1759: SemiCircle to Gauge * fix: implemented animated numbers * tidy: refactor * MP-1759: added Tooltip to the Gauge * fix: replace animate={true} with animate * fix: fixed the Gauge timing * fix: updated the BorrowCapacity styles * fix: renamed SubAccount to Account * fix: Text should not be a button, Button should be * tidy: format * fix: Text no clicky * fix: replaced all the Text appearances with onClick
30 lines
638 B
TypeScript
30 lines
638 B
TypeScript
import Link from 'next/link'
|
|
import { useRouter } from 'next/router'
|
|
import { ReactNode } from 'react'
|
|
import classNames from 'classnames'
|
|
|
|
interface Props {
|
|
href: string
|
|
children: string | ReactNode
|
|
}
|
|
|
|
const NavLink = ({ href, children }: Props) => {
|
|
const router = useRouter()
|
|
const isActive = router.pathname === href
|
|
|
|
return (
|
|
<Link href={href} passHref>
|
|
<a
|
|
className={classNames(
|
|
'text-lg-caps hover:text-white active:text-white',
|
|
isActive ? 'pointer-events-none text-white' : 'text-white/60',
|
|
)}
|
|
>
|
|
{children}
|
|
</a>
|
|
</Link>
|
|
)
|
|
}
|
|
|
|
export default NavLink
|