Fixed water wave

This commit is contained in:
Dummy Tester 123 2021-02-09 19:21:06 -06:00
parent 5db3d3c743
commit e2bb208feb
2 changed files with 3 additions and 5 deletions

View File

@ -2,8 +2,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
import './index.less'; import './index.less';
export const WaterWave = (props: any) => { export const WaterWave = (props: any) => {
return null; const node = useRef<HTMLCanvasElement>();
/* const node = useRef<HTMLCanvasElement>();
const root = useRef<HTMLDivElement>(); const root = useRef<HTMLDivElement>();
const [radio, setRadio] = useState(1); const [radio, setRadio] = useState(1);
const { percent, title, style, color, showPercent } = props; const { percent, title, style, color, showPercent } = props;
@ -112,7 +111,7 @@ const renderChart = (
ctx.beginPath(); ctx.beginPath();
ctx.save(); ctx.save();
const sinStack: Array<[number, number]> = []; const sinStack = [];
for (let i = xOffset; i <= xOffset + axisLength; i += 20 / axisLength) { for (let i = xOffset; i <= xOffset + axisLength; i += 20 / axisLength) {
const x = sp + (xOffset + i) / unit; const x = sp + (xOffset + i) / unit;
const y = Math.sin(x) * currRange; const y = Math.sin(x) * currRange;
@ -189,5 +188,5 @@ const renderChart = (
setTimer(requestAnimationFrame(render)); setTimer(requestAnimationFrame(render));
}; };
render();*/ render();
}; };

View File

@ -87,7 +87,6 @@ export const useLending = () => {
const programAccounts = await connection.getProgramAccounts( const programAccounts = await connection.getProgramAccounts(
LENDING_PROGRAM_ID, LENDING_PROGRAM_ID,
); );
console.log('Accounts', programAccounts);
const accounts = programAccounts const accounts = programAccounts
.map(processAccount) .map(processAccount)