mirror of
https://github.com/apotdevin/thunderhub.git
synced 2025-02-22 22:25:21 +01:00
* chore: 🔧 remove client * chore: 🔧 change cookie name * chore: 🔧 remove auth param * chore: 🔧 remove auth components * chore: 🔧 add getaccount query * fix: 🐛 tests * chore: 🔧 get account * chore: 🔧 status check * chore: 🔧 remove log * chore: 🔧 update apollo client * refactor: ♻️ server side props * chore: 🔧 ssr queries * chore: 🔧 more ssr queries * chore: 🔧 type check * chore: 🔧 increase nodeinfo limit Co-authored-by: apotdevin <apotdevincab@gmail.com>
52 lines
1.3 KiB
TypeScript
52 lines
1.3 KiB
TypeScript
import React from 'react';
|
|
import styled from 'styled-components';
|
|
import { GridWrapper } from 'src/components/gridWrapper/GridWrapper';
|
|
import { VolumeStats } from 'src/views/stats/FlowStats';
|
|
import { TimeStats } from 'src/views/stats/TimeStats';
|
|
import { FeeStats } from 'src/views/stats/FeeStats';
|
|
import { StatResume } from 'src/views/stats/StatResume';
|
|
import { StatsProvider } from 'src/views/stats/context';
|
|
import { NextPageContext } from 'next';
|
|
import { getProps } from 'src/utils/ssr';
|
|
import { GET_FEE_HEALTH } from 'src/graphql/queries/getFeeHealth';
|
|
import { GET_VOLUME_HEALTH } from 'src/graphql/queries/getVolumeHealth';
|
|
import { GET_TIME_HEALTH } from 'src/graphql/queries/getTimeHealth';
|
|
import { SingleLine } from '../src/components/generic/Styled';
|
|
|
|
export const ButtonRow = styled.div`
|
|
width: auto;
|
|
display: flex;
|
|
`;
|
|
|
|
export const SettingsLine = styled(SingleLine)`
|
|
margin: 8px 0;
|
|
`;
|
|
|
|
const StatsView = () => {
|
|
return (
|
|
<>
|
|
<StatResume />
|
|
<VolumeStats />
|
|
<TimeStats />
|
|
<FeeStats />
|
|
</>
|
|
);
|
|
};
|
|
|
|
const Wrapped = () => (
|
|
<GridWrapper>
|
|
<StatsProvider>
|
|
<StatsView />
|
|
</StatsProvider>
|
|
</GridWrapper>
|
|
);
|
|
|
|
export default Wrapped;
|
|
|
|
export async function getServerSideProps(context: NextPageContext) {
|
|
return await getProps(context, [
|
|
GET_FEE_HEALTH,
|
|
GET_VOLUME_HEALTH,
|
|
GET_TIME_HEALTH,
|
|
]);
|
|
}
|