umami/pages/website/[...id].js
2020-08-03 18:12:28 -07:00

20 lines
397 B
JavaScript

import React from 'react';
import { useRouter } from 'next/router';
import Layout from 'components/Layout';
import WebsiteDetails from '../../components/WebsiteDetails';
export default function DetailsPage() {
const router = useRouter();
const { id } = router.query;
if (!id) {
return null;
}
return (
<Layout>
<WebsiteDetails websiteId={+id[0]} />
</Layout>
);
}