chore: removes non-required param

This commit is contained in:
Nicolás Quiroz 2022-11-25 17:51:14 -03:00
parent d37b803f62
commit 2c226f5c41
2 changed files with 6 additions and 14 deletions

@ -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>