thunderhub/pages/index.tsx
Anthony Potdevin 9d73c30fb4
feat: server authentication (#38)
* feat:  server sso auth

* chore: 🔧 continue sso integration

* fix: 🐛 correct filter

* chore: 🔧 add resolver types

* chore: 🔧 linter sort imports

* fix: 🐛 duplicate imports

* chore: 🔧 change auth context

* feat:  add accounts read and query

* fix: 🐛 small changes

* chore: 🔧 continue integration

* chore: 🔧 add auth

* chore: 🔧 switch to new context

* fix: 🐛 imports and account context

* chore: 🔧 add session token query

* chore: 🔧 change server auth

* chore: 🔧 add sso to server accounts query

* chore: 🔧 cleanup and small fixes

* chore: 🔧 separate generated files

* refactor: ♻️ change graphql imports

* fix: 🐛 add id to params

* fix: 🐛 auth changes

* chore: 🔧 improve logging and account fixes

* chore: 🔧 change footer

* chore: 🔧 remove console logs

* chore: 🔧 add spacing

* fix: 🐛 final changes
2020-05-19 07:50:16 +02:00

37 lines
1 KiB
TypeScript

import * as React from 'react';
import { Spacer } from 'src/components/spacer/Spacer';
import { SessionLogin } from '../src/views/login/SessionLogin';
import { TopSection } from '../src/views/homepage/Top';
import { LoginBox } from '../src/views/homepage/LoginBox';
import { Accounts } from '../src/views/homepage/Accounts';
import { useStatusState } from '../src/context/StatusContext';
import { LoadingCard } from '../src/components/loading/LoadingCard';
import { Section } from '../src/components/section/Section';
const ContextApp = () => {
const { loading } = useStatusState();
return (
<>
<TopSection />
{loading && (
<Section withColor={false}>
<LoadingCard
inverseColor={true}
loadingHeight={'160px'}
title={`Connecting to ${name}`}
/>
</Section>
)}
{!loading && (
<>
<SessionLogin />
<Accounts />
<LoginBox />
</>
)}
<Spacer />
</>
);
};
export default ContextApp;