2021-06-20 15:49:56 +02:00
|
|
|
import React from 'react'
|
2021-06-24 10:48:39 +02:00
|
|
|
import Card from '../../components/Card'
|
2021-06-21 05:18:30 +02:00
|
|
|
import Head from 'next/head'
|
2021-06-22 02:22:10 +02:00
|
|
|
import { useSession } from 'next-auth/client'
|
2021-06-28 02:28:53 +02:00
|
|
|
import { Flex, Text, Spacer } from "@chakra-ui/react"
|
|
|
|
|
2021-06-20 15:49:56 +02:00
|
|
|
|
2021-06-22 02:24:07 +02:00
|
|
|
function Index() {
|
2021-06-22 02:22:10 +02:00
|
|
|
|
|
|
|
const [session, loading] = useSession()
|
|
|
|
|
2021-06-20 15:49:56 +02:00
|
|
|
return (
|
2021-06-28 02:28:53 +02:00
|
|
|
<>
|
2021-06-22 02:22:10 +02:00
|
|
|
{!session && <>
|
|
|
|
<h1>Seems like you're not logged in. Log in to get started!</h1>
|
|
|
|
</>
|
|
|
|
}
|
|
|
|
{session && <>
|
|
|
|
<Head>
|
|
|
|
<title>Cath Control Panel</title>
|
|
|
|
</Head>
|
|
|
|
<div>
|
2021-06-28 02:28:53 +02:00
|
|
|
<Text fontSize='4xl' marginBottom='15'>Control Panel</Text>
|
|
|
|
<Flex direction='column'>
|
|
|
|
<Card title='Commands' desc='Control your commands' link='/controlpanel/commands'/>
|
|
|
|
<Spacer/>
|
|
|
|
<Card title='Commands' desc='Control your commands' link='/controlpanel/commands'/>
|
|
|
|
<Spacer/>
|
|
|
|
<Card title='Commands' desc='Control your commands' link='/controlpanel/commands'/>
|
|
|
|
</Flex>
|
2021-06-22 02:22:10 +02:00
|
|
|
</div>
|
|
|
|
</>
|
|
|
|
}
|
2021-06-21 05:18:30 +02:00
|
|
|
</>
|
2021-06-20 15:49:56 +02:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2021-06-22 02:24:07 +02:00
|
|
|
export default Index
|