2020-05-19 07:50:16 +02:00
|
|
|
import * as React from 'react';
|
|
|
|
import { Spacer } from 'src/components/spacer/Spacer';
|
2020-05-26 07:03:33 +02:00
|
|
|
import { ServerAccounts } from 'src/components/accounts/ServerAccounts';
|
2020-06-14 19:20:22 +02:00
|
|
|
import { ThunderStorm } from 'src/views/homepage/HomePage.styled';
|
2020-08-09 16:12:05 +02:00
|
|
|
import { appendBasePath } from 'src/utils/basePath';
|
2020-08-03 16:31:20 +02:00
|
|
|
import { NextPageContext } from 'next';
|
|
|
|
import { GET_SERVER_ACCOUNTS } from 'src/graphql/queries/getServerAccounts';
|
|
|
|
import { getProps } from 'src/utils/ssr';
|
2020-04-22 10:14:33 +02:00
|
|
|
import { TopSection } from '../src/views/homepage/Top';
|
|
|
|
import { Accounts } from '../src/views/homepage/Accounts';
|
2020-04-12 18:27:01 +02:00
|
|
|
|
2020-08-03 16:31:20 +02:00
|
|
|
const ContextApp = () => (
|
|
|
|
<>
|
2020-08-09 16:12:05 +02:00
|
|
|
<ThunderStorm alt={''} src={appendBasePath('/static/thunderstorm.gif')} />
|
2020-08-03 16:31:20 +02:00
|
|
|
<TopSection />
|
|
|
|
<Accounts />
|
|
|
|
<Spacer />
|
|
|
|
</>
|
|
|
|
);
|
2020-04-12 18:27:01 +02:00
|
|
|
|
2020-05-26 07:03:33 +02:00
|
|
|
const Wrapped = () => (
|
|
|
|
<>
|
|
|
|
<ServerAccounts />
|
|
|
|
<ContextApp />
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
|
2020-08-03 16:31:20 +02:00
|
|
|
export default Wrapped;
|
|
|
|
|
|
|
|
export async function getServerSideProps(context: NextPageContext) {
|
|
|
|
return await getProps(context, [GET_SERVER_ACCOUNTS]);
|
|
|
|
}
|