2020-08-06 08:03:07 +02:00
|
|
|
import React from 'react';
|
2020-09-11 08:55:29 +02:00
|
|
|
import { useRouter } from 'next/router';
|
2020-08-07 11:27:12 +02:00
|
|
|
import Layout from 'components/layout/Layout';
|
2020-09-27 09:51:29 +02:00
|
|
|
import WebsiteList from 'components/pages/WebsiteList';
|
2020-08-06 08:03:07 +02:00
|
|
|
import useRequireLogin from 'hooks/useRequireLogin';
|
|
|
|
|
|
|
|
export default function DashboardPage() {
|
|
|
|
const { loading } = useRequireLogin();
|
2020-09-11 08:55:29 +02:00
|
|
|
const router = useRouter();
|
|
|
|
const { id } = router.query;
|
|
|
|
const userId = id?.[0];
|
2020-08-06 08:03:07 +02:00
|
|
|
|
|
|
|
if (loading) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Layout>
|
2020-09-11 08:55:29 +02:00
|
|
|
<WebsiteList userId={userId} />
|
2020-08-06 08:03:07 +02:00
|
|
|
</Layout>
|
|
|
|
);
|
|
|
|
}
|