Skip to content

Commit

Permalink
feat: 调整样式
Browse files Browse the repository at this point in the history
  • Loading branch information
梁怀刚 committed Jul 12, 2024
1 parent 13b3497 commit 7b24c16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/components/Gitalk/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import CryptoJS from "crypto-js";
import { useEffect, useState } from "react";
import styles from "./styles.module.css";

export default function Gitalk(props) {
export default function Gitalk(props: { isBlog: boolean }) {
const { isBlog } = props;
// 使用状态来控制GitalkComponent的渲染
const [isClient, setIsClient] = useState(false);

Expand All @@ -13,7 +14,7 @@ export default function Gitalk(props) {
setIsClient(true);
}, []);
return isClient ? (
<div className={styles.wrapper}>
<div className={isBlog ? null : styles.wrapper}>
<GitalkComponent
options={{
clientID: "Ov23lit1eRiiNbsLJ8xv",
Expand Down
2 changes: 1 addition & 1 deletion src/theme/BlogPostPaginator/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function BlogPostPaginatorWrapper(props: Props): JSX.Element {
return (
<>
<BlogPostPaginator {...props} />
<Gitalk />
<Gitalk isBlog />
</>
);
}

0 comments on commit 7b24c16

Please sign in to comment.