[fix] fix some problem in code style

This commit is contained in:
PrinOrange
2024-09-28 22:13:37 +08:00
parent 6d15618747
commit 19a78c0704
4 changed files with 3 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
const H2 = (props: JSX.IntrinsicElements["h2"]) => { const H2 = (props: JSX.IntrinsicElements["h2"]) => {
return ( return (
<h2 className={"caption-font mt-6 mb-2 scroll-mt-20"} id={props.id}> <h2 className={"caption-font mt-6 mb-2 scroll-mt-20 text-[1.45rem]"} id={props.id}>
{props.children} {props.children}
</h2> </h2>
); );

View File

@@ -19,7 +19,7 @@ export const PostRender = (props: {
<div className="border-black border-b-2 pb-1 dark:border-gray-300"> <div className="border-black border-b-2 pb-1 dark:border-gray-300">
<div <div
className={ className={
"caption-font my-2 flex justify-center whitespace-normal break-words font-bold text-[1.8rem] text-black leading-[2.1rem] dark:text-white" "caption-font my-2 flex justify-center whitespace-normal break-words font-bold text-[1.65rem] text-black leading-[2.1rem] dark:text-white"
} }
> >
{props.frontMatter?.title} {props.frontMatter?.title}

View File

@@ -24,7 +24,7 @@ export default function SearchPage(props: SearchPageProps) {
const { toast } = useToast(); const { toast } = useToast();
const fetchSearchAPI = (param: string): Promise<TSearchResultItem[]> => { const fetchSearchAPI = (param: string): Promise<TSearchResultItem[]> => {
setIsLoading(true) setIsLoading(true);
return axios.get<TSearchResultItem[]>(`/api/search/${param}`).then((response) => response.data); return axios.get<TSearchResultItem[]>(`/api/search/${param}`).then((response) => response.data);
}; };

View File

@@ -1,5 +1,3 @@
import type { TPostFrontmatter } from "./frontmatter.type";
export type TPostListItem = { export type TPostListItem = {
id: string; id: string;
frontMatter: TPostFrontmatter; frontMatter: TPostFrontmatter;