Skip to content

Commit

Permalink
chore: optimize code and remove consolelog
Browse files Browse the repository at this point in the history
  • Loading branch information
FarhanRafid97 committed Sep 21, 2023
1 parent 3e12f12 commit fed613d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/app/blog/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const ProfileSumarry = () => {
<div className="w-[150px] h-[150px] md:min-w-[120px] bg-white rounded-[50%] overflow-hidden md:h-[140px]">
<Image
src="/assets/profile2.jpg"
width={450}
height={450}
width={150}
height={150}
className="rounded-lg "
priority
alt="profile pict"
Expand Down
2 changes: 1 addition & 1 deletion src/components/PostPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const PostPreview = ({ ...props }) => {
const pathName = usePathname().split('/')[1];

return (
<Link href={`/blog/${props.slug}?backUrl=${pathName}`}>
<Link href={`/blog/${props.slug}?backUrl=${pathName === '' ? '/' : pathName}`}>
<div className="border border-[#404040] w-full dark:border-neutral-700 bg-[#262626] hover:bg-[#262626]/30 dark:bg-neutral-800 rounded flex items-center justify-between px-3 py-4 ">
<div className="flex flex-col">
<p className="font-bold text-white dark:text-neutral-100">{props.title}</p>
Expand Down
1 change: 1 addition & 0 deletions src/hooks/use-flubber.tsx
Original file line number Diff line number Diff line change
@@ -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<number>, paths: string[]) {
Expand Down
1 change: 0 additions & 1 deletion src/utils/getPosts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const getPostMetadata = (): PostMetadata[] => {
};
});

console.log(posts);
return posts;
};

Expand Down

0 comments on commit fed613d

Please sign in to comment.