diff --git a/app/blog/BlogPostCard.tsx b/app/blog/BlogPostCard.tsx index 814ab60..49247e9 100644 --- a/app/blog/BlogPostCard.tsx +++ b/app/blog/BlogPostCard.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Card, CardBody, CardFooter } from '@nextui-org/card'; -import { Chip, Image } from '@nextui-org/react'; -import NextImage from 'next/image'; +import { Chip } from '@nextui-org/react'; +import Image from 'next/image'; import Link from 'next/link'; import { MdCalendarMonth, MdNorthEast } from 'react-icons/md'; @@ -29,10 +29,8 @@ function BlogPostCard({ post }: Props) { isHoverable > - { header_img !== '' &&
{
} diff --git a/app/blog/page.tsx b/app/blog/page.tsx index 4428fc5..5e14605 100644 --- a/app/blog/page.tsx +++ b/app/blog/page.tsx @@ -2,6 +2,7 @@ import React from 'react'; import fetch_posts_list from '@/app/blog/fetch_posts_list'; import BlogPostCard from '@/app/blog/BlogPostCard'; import { Card, CardBody } from '@nextui-org/card'; +import { MotionDiv } from '@/app/public/MotionDiv'; async function Blog() { @@ -11,9 +12,15 @@ async function Blog() { return ( // blog list diff --git a/app/blog/post/[id]/page.tsx b/app/blog/post/[id]/page.tsx index 095aaf7..470c296 100644 --- a/app/blog/post/[id]/page.tsx +++ b/app/blog/post/[id]/page.tsx @@ -1,12 +1,19 @@ import React from 'react'; import Generate from '@/app/blog/post/[id]/generate'; +import { MotionDiv } from '@/app/public/MotionDiv'; function BlogReader({ params }: { params: { id: string } }) { return ( -
- -
+ +
+ +
+
); } diff --git a/app/public/MotionDiv.tsx b/app/public/MotionDiv.tsx new file mode 100644 index 0000000..224a656 --- /dev/null +++ b/app/public/MotionDiv.tsx @@ -0,0 +1,5 @@ +'use client'; + +import { motion } from 'framer-motion'; + +export const MotionDiv = motion.div; diff --git a/components/Navbar.tsx b/components/Navbar.tsx index b16b09b..8be058d 100644 --- a/components/Navbar.tsx +++ b/components/Navbar.tsx @@ -1,7 +1,7 @@ 'use client'; import React, { useEffect, useState } from 'react'; -import { Button, Image } from '@nextui-org/react'; +import { Button } from '@nextui-org/react'; import NextImage from 'next/image'; import { IoFileTrayFull, @@ -115,16 +115,14 @@ function Navbar() {
- { + priority={ true } + >
diff --git a/package.json b/package.json index 5f5fc21..f4a0254 100644 --- a/package.json +++ b/package.json @@ -11,9 +11,9 @@ "dependencies": { "@nextui-org/react": "^2.3.5", "axios": "^1.6.8", - "framer-motion": "^11.1.7", + "framer-motion": "^11.2.10", "lxgw-wenkai-webfont": "^1.7.0", - "next": "14.2.2", + "next": "14.2.3", "next-themes": "^0.3.0", "react": "^18", "react-dom": "^18",