mirror of
https://github.com/hazemKrimi/personal-website.git
synced 2026-05-02 02:10:27 +00:00
Refactoring components
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { FC, useEffect } from 'react';
|
||||
import { useEffect } from 'react';
|
||||
import { getPortfolioPorjectsSlugs, getPortfolioProjectdata } from '../../utils/portfolio';
|
||||
import { useRouter } from 'next/router';
|
||||
import { MDXRemote, MDXRemoteSerializeResult } from 'next-mdx-remote';
|
||||
@@ -18,7 +18,7 @@ interface Props {
|
||||
frontMatter: any;
|
||||
}
|
||||
|
||||
const PortfolioProject: FC<Props> = ({ source, frontMatter }) => {
|
||||
const PortfolioProject = ({ source, frontMatter }: Props) => {
|
||||
const router = useRouter();
|
||||
const htmlOverrides = { code: CodeBlock };
|
||||
const mdxComponents = { Button: MDXButton };
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React, { FC } from 'react';
|
||||
import { getPortfolioProjects } from '../../utils/portfolio';
|
||||
import { useRouter } from 'next/router';
|
||||
import { Wrapper } from '../../styles/portfolio';
|
||||
@@ -17,7 +16,7 @@ interface Props {
|
||||
}[];
|
||||
}
|
||||
|
||||
const Index: FC<Props> = ({ portfolioProjects }) => {
|
||||
const Index = ({ portfolioProjects }: Props) => {
|
||||
const router = useRouter();
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user