mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
prettier
This commit is contained in:
parent
575d0d24a2
commit
12164b694d
|
@ -156,7 +156,6 @@ export interface GridStats {
|
|||
}
|
||||
|
||||
export async function queryStrategiesMetrics(): Promise<GridStrategy[]> {
|
||||
|
||||
const temp = {
|
||||
id: 'uuid',
|
||||
instanceID: 'testInstanceID',
|
||||
|
@ -177,15 +176,15 @@ export async function queryStrategiesMetrics(): Promise<GridStrategy[]> {
|
|||
},
|
||||
status: 'RUNNING',
|
||||
startTime: 1654938187102,
|
||||
}
|
||||
};
|
||||
|
||||
const testArr = [];
|
||||
|
||||
for (let i = 0; i < 11; i++) {
|
||||
const cloned = {...temp}
|
||||
cloned.id = "uuid" + i;
|
||||
const cloned = { ...temp };
|
||||
cloned.id = 'uuid' + i;
|
||||
testArr.push(cloned);
|
||||
}
|
||||
|
||||
return testArr
|
||||
return testArr;
|
||||
}
|
||||
|
|
|
@ -42,12 +42,10 @@ export default function Detail({ data }:{ data: GridStrategy}) {
|
|||
<div>{data[strategy].symbol}</div>
|
||||
<RunningTime seconds={seconds} />
|
||||
<Description>
|
||||
0 arbitrages in 24 hours / Total <span>{stats.totalArbs}</span> arbitrages
|
||||
0 arbitrages in 24 hours / Total <span>{stats.totalArbs}</span>{' '}
|
||||
arbitrages
|
||||
</Description>
|
||||
<Summary
|
||||
stats={stats}
|
||||
totalProfitsPercentage={totalProfitsPercentage}
|
||||
/>
|
||||
<Summary stats={stats} totalProfitsPercentage={totalProfitsPercentage} />
|
||||
<Stats
|
||||
stats={stats}
|
||||
gridProfitsPercentage={gridProfitsPercentage}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { styled } from '@mui/styles';
|
||||
import { Description } from './Detail'
|
||||
import { Description } from './Detail';
|
||||
|
||||
const RunningTimeSection = styled('div')(() => ({
|
||||
display: 'flex',
|
||||
|
|
|
@ -7,7 +7,15 @@ const StatsSection = styled('div')(() => ({
|
|||
gap: '10px',
|
||||
}));
|
||||
|
||||
export default function Stats({stats, gridProfitsPercentage, gridAprPercentage}:{stats: GridStats, gridProfitsPercentage: number, gridAprPercentage: number}){
|
||||
export default function Stats({
|
||||
stats,
|
||||
gridProfitsPercentage,
|
||||
gridAprPercentage,
|
||||
}: {
|
||||
stats: GridStats;
|
||||
gridProfitsPercentage: number;
|
||||
gridAprPercentage: number;
|
||||
}) {
|
||||
return (
|
||||
<StatsSection>
|
||||
<div>
|
||||
|
|
|
@ -25,7 +25,13 @@ export const Percentage = styled('div')(() => ({
|
|||
color: 'rgb(123, 169, 90)',
|
||||
}));
|
||||
|
||||
export default function Summary({stats, totalProfitsPercentage}:{stats: GridStats,totalProfitsPercentage:number}) {
|
||||
export default function Summary({
|
||||
stats,
|
||||
totalProfitsPercentage,
|
||||
}: {
|
||||
stats: GridStats;
|
||||
totalProfitsPercentage: number;
|
||||
}) {
|
||||
return (
|
||||
<SummarySection>
|
||||
<SummaryBlock>
|
||||
|
@ -39,5 +45,5 @@ export default function Summary({stats, totalProfitsPercentage}:{stats: GridStat
|
|||
<Percentage>{totalProfitsPercentage}%</Percentage>
|
||||
</SummaryBlock>
|
||||
</SummarySection>
|
||||
)
|
||||
);
|
||||
}
|
|
@ -38,7 +38,6 @@ export default function Strategies() {
|
|||
return <Detail key={element.id} data={element} />;
|
||||
})}
|
||||
</StrategiesContainer>
|
||||
|
||||
</DashboardLayout>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user