Skip to content

Commit

Permalink
build: bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Majorfi committed Feb 13, 2024
1 parent c2c0965 commit 4fbe3cc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@yearn-finance/web-lib",
"version": "3.0.164",
"version": "3.0.165",
"main": "./dist/index.js",
"types": "./dist/index.d.js",
"files": [
Expand Down
15 changes: 12 additions & 3 deletions src/components/LogoPopover.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
'use client';

import {cloneElement, useMemo, useState} from 'react';
import Link from 'next/link';
import {usePathname} from 'next/navigation';
import {motion} from 'framer-motion';
import {cl, toAddress} from '@builtbymom/web3/utils';
import {Popover, Transition} from '@headlessui/react';
Expand Down Expand Up @@ -38,13 +41,14 @@ function MotionDiv({animate, name, children}: TMotionDiv): ReactElement {
}

function Logo(): ReactElement {
const pathname = usePathname();
const currentHost = useMemo(() => {
if (typeof window === 'undefined') {
return 'yearn.fi';
}
return window.location.host;
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [typeof window]);
}, [typeof window, pathname]);

const vaultPageData = useMemo(() => {
if (typeof window === 'undefined') {
Expand All @@ -65,7 +69,7 @@ function Logo(): ReactElement {
vaultAddress: isVaultPage && window.location.pathname.split('/')[3]
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [typeof window]);
}, [typeof window, pathname]);

return (
<>
Expand All @@ -88,6 +92,7 @@ function Logo(): ReactElement {
src={`https://assets.smold.app/api/token/${vaultPageData.chainID}/${toAddress(
vaultPageData.vaultAddress || ''
)}/logo-128.png`}
className={'-ml-9'}
alt={''}
smWidth={48}
smHeight={48}
Expand Down Expand Up @@ -173,7 +178,11 @@ export function LogoPopover(): ReactElement {
'flex cursor-pointer flex-col items-center justify-center transition-colors p-4 rounded',
'bg-[#EBEBEB] border-transparent hover:bg-[#c3c3c380] dark:bg-neutral-0 hover:dark:bg-neutral-0/60'
)}>
<div>{cloneElement(icon, {className: 'w-8 h-8'})}</div>
<div>
{cloneElement(icon, {
className: 'w-8 h-8 min-w-8 max-w-8 min-h-8 max-h-8'
})}
</div>
<div className={'pt-2 text-center'}>
<b className={'text-base'}>{name}</b>
</div>
Expand Down

0 comments on commit 4fbe3cc

Please sign in to comment.