♻️ refactor: standardize code formatting and improve readability across components

- Updated component files to use consistent single quotes for strings.
- Removed unnecessary newlines and adjusted indentation for better readability.
- Simplified conditional rendering and improved code structure in various components.
- Added ESLint configuration for better code quality and adherence to standards.
- Enhanced error handling in i18n request logic.
This commit is contained in:
2025-07-26 10:01:27 +08:00
parent e659de23fb
commit 99e291654d
29 changed files with 2214 additions and 355 deletions

View File

@ -1,13 +1,14 @@
import { getPostById } from "@/api/post";
import BlogPost from "@/components/blog-post";
import { getPostById } from '@/api/post'
import BlogPost from '@/components/blog-post'
interface Props {
params: Promise<{ id: string }>
}
export default async function PostPage({ params }: Props) {
const { id } = await params;
const post = await getPostById(id);
if (!post) return <div></div>;
return <BlogPost post={post} />;
}
const { id } = await params
const post = await getPostById(id)
if (!post)
return <div></div>
return <BlogPost post={post} />
}