fix console error
This commit is contained in:
parent
3f5224c119
commit
789772ef6b
|
@ -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 (
|
||||
<Link href={path} shallow={true}>
|
||||
<span
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { useMemo } from 'react'
|
||||
import { useEffect, useMemo } from 'react'
|
||||
import useStakeRates from './useStakeRates'
|
||||
import useMangoGroup from './useMangoGroup'
|
||||
import mangoStore from '@store/mangoStore'
|
||||
|
@ -8,6 +8,7 @@ const set = mangoStore.getState().set
|
|||
export default function useBankRates(selectedToken: string, leverage: number) {
|
||||
const { data: stakeRates } = useStakeRates()
|
||||
const { group } = useMangoGroup()
|
||||
const estimatedMaxAPY = mangoStore((s) => 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
|
||||
|
|
|
@ -38,8 +38,6 @@ const fetchRates = async () => {
|
|||
return rateData
|
||||
}
|
||||
|
||||
fetchRates()
|
||||
|
||||
export default function useStakeRates() {
|
||||
const response = useQuery(['stake-rates'], () => fetchRates(), {
|
||||
cacheTime: 1000 * 60 * 5,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue