From fed613dcf64d4da521acbfc62b7a720288df73e8 Mon Sep 17 00:00:00 2001 From: farhan rafid syauqi Date: Thu, 21 Sep 2023 22:27:22 +0700 Subject: [PATCH] chore: optimize code and remove consolelog --- src/app/blog/[slug]/page.tsx | 1 + src/app/page.tsx | 4 ++-- src/components/PostPreview.tsx | 2 +- src/hooks/use-flubber.tsx | 1 + src/utils/getPosts.ts | 1 - 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/app/blog/[slug]/page.tsx b/src/app/blog/[slug]/page.tsx index 2299751..fea0664 100644 --- a/src/app/blog/[slug]/page.tsx +++ b/src/app/blog/[slug]/page.tsx @@ -22,6 +22,7 @@ export const generateStaticParams = async () => { })); }; +// eslint-disable-next-line @typescript-eslint/no-explicit-any const PostPage = (props: any) => { const slug = props.params.slug; diff --git a/src/app/page.tsx b/src/app/page.tsx index 933812a..8aeb68e 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -21,8 +21,8 @@ const ProfileSumarry = () => {
profile pict { const pathName = usePathname().split('/')[1]; return ( - +

{props.title}

diff --git a/src/hooks/use-flubber.tsx b/src/hooks/use-flubber.tsx index ca4cca1..fef23cf 100644 --- a/src/hooks/use-flubber.tsx +++ b/src/hooks/use-flubber.tsx @@ -1,6 +1,7 @@ import { interpolate } from 'flubber'; import { MotionValue, useTransform } from 'framer-motion'; +// eslint-disable-next-line @typescript-eslint/no-explicit-any export const getIndex = (_: any, index: number) => index; export function useFlubber(progress: MotionValue, paths: string[]) { diff --git a/src/utils/getPosts.ts b/src/utils/getPosts.ts index a50eb1f..de9cb1d 100644 --- a/src/utils/getPosts.ts +++ b/src/utils/getPosts.ts @@ -21,7 +21,6 @@ const getPostMetadata = (): PostMetadata[] => { }; }); - console.log(posts); return posts; };