nyx-dashboard/pages/controlpanel/index.js

31 lines
772 B
JavaScript
Raw Normal View History

2021-06-20 15:49:56 +02:00
import React from 'react'
import CardContainer from '../../components/CardContainer'
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-20 15:49:56 +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-21 05:18:30 +02:00
<>
2021-06-22 02:22:10 +02:00
{!session && <>
<h1>Seems like you&apos;re not logged in. Log in to get started!</h1>
</>
}
{session && <>
<Head>
<title>Cath Control Panel</title>
</Head>
<div>
<h1>Control Panel</h1>
<CardContainer link='/controlpanel/commands'>Commands</CardContainer>
</div>
</>
}
2021-06-21 05:18:30 +02:00
</>
2021-06-20 15:49:56 +02:00
)
}
export default index