diff --git a/components/TopBar.tsx b/components/TopBar.tsx index e3dca6e..80e5a3b 100644 --- a/components/TopBar.tsx +++ b/components/TopBar.tsx @@ -52,9 +52,15 @@ const TopBar = () => { export default TopBar -const NavLink = ( - { active, path, text }: { active: boolean; path: string; text: string }, -) => { +const NavLink = ({ + active, + path, + text, +}: { + active: boolean + path: string + text: string +}) => { return ( s.estimatedMaxAPY.current) const stakeBank = useMemo(() => { return group?.banksMapByName.get(selectedToken)?.[0] @@ -39,7 +40,7 @@ export default function useBankRates(selectedToken: string, leverage: number) { ) }, [borrowBankStakeRate, leverage, borrowBankBorrowRate]) - const estimatedMaxAPY = useMemo(() => { + useEffect(() => { set((s) => { s.estimatedMaxAPY.current = borrowBankStakeRate * 3 - borrowBankBorrowRate * 2 diff --git a/hooks/useStakeRates.ts b/hooks/useStakeRates.ts index 22d37cf..bcb0a6b 100644 --- a/hooks/useStakeRates.ts +++ b/hooks/useStakeRates.ts @@ -38,8 +38,6 @@ const fetchRates = async () => { return rateData } -fetchRates() - export default function useStakeRates() { const response = useQuery(['stake-rates'], () => fetchRates(), { cacheTime: 1000 * 60 * 5, diff --git a/styles/globals.css b/styles/globals.css index f0f2f92..1fb1255 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -295,7 +295,7 @@ table p { } #range-slider-gradient .range-slider__thumb[data-upper] { - @apply border-th-primary-3 bg-th-primary-1 h-7 w-4 rounded-full border shadow-[inset_0_-3px_0px_rgba(0,0,0,0.15)]; + @apply h-7 w-4 rounded-full border border-th-primary-3 bg-th-primary-1 shadow-[inset_0_-3px_0px_rgba(0,0,0,0.15)]; } #range-slider-gradient .range-slider__range { @@ -372,7 +372,7 @@ table p { } .raised-button-primary { - @apply bg-th-primary-1 relative transition-none; + @apply relative bg-th-primary-1 transition-none; box-shadow: 0 4px var(--primary-3); }