chore: removes non-required param
This commit is contained in:
parent
d37b803f62
commit
2c226f5c41
@ -1,12 +1,11 @@
|
||||
import { Breadcrumb, BreadcrumbItem, BreadcrumbLink } from '@chakra-ui/react';
|
||||
import NextLink from 'next/link';
|
||||
import { useRouter } from 'next/router';
|
||||
import { FC } from 'react';
|
||||
|
||||
interface Props {
|
||||
router: any;
|
||||
}
|
||||
export const Breadcrumbs: FC = () => {
|
||||
const router = useRouter();
|
||||
|
||||
export const Breadcrumbs: FC<Props> = ({ router }) => {
|
||||
let pathSplit = router.asPath.split('/');
|
||||
pathSplit = pathSplit.splice(1, pathSplit.length);
|
||||
|
||||
|
@ -6,12 +6,10 @@ import { Heading, Stack } from '@chakra-ui/react';
|
||||
import MDXComponents from '../components/';
|
||||
import { ParsedUrlQuery } from 'querystring';
|
||||
import type { GetStaticPaths, GetStaticProps, NextPage } from 'next';
|
||||
import { useRouter } from 'next/router';
|
||||
import { Breadcrumbs } from '../components/docs'
|
||||
import { Breadcrumbs } from '../components/docs';
|
||||
|
||||
import { PageMetadata } from '../components/UI';
|
||||
|
||||
|
||||
const MATTER_OPTIONS = {
|
||||
engines: {
|
||||
yaml: (s: any) => yaml.load(s, { schema: yaml.JSON_SCHEMA }) as object
|
||||
@ -73,18 +71,13 @@ interface Props {
|
||||
}
|
||||
|
||||
const DocPage: NextPage<Props> = ({ frontmatter, content }) => {
|
||||
const router = useRouter()
|
||||
|
||||
return (
|
||||
<>
|
||||
<PageMetadata
|
||||
title={frontmatter.title}
|
||||
description={frontmatter.description}
|
||||
/>
|
||||
<PageMetadata title={frontmatter.title} description={frontmatter.description} />
|
||||
|
||||
<main>
|
||||
<Stack py={8} px={4}>
|
||||
<Breadcrumbs router={router} />
|
||||
<Breadcrumbs />
|
||||
|
||||
<Heading as='h1'>{frontmatter.title}</Heading>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user