Skip to content

Commit 0016dd5

Browse files
authored
fix: update import location in giscus example (#474)
1 parent 6749f62 commit 0016dd5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/data/blog/how-to-integrate-giscus-comments.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Then we create a new `Comments.tsx` React component in `src/components`:
110110

111111
```tsx
112112
import Giscus, { type Theme } from "@giscus/react";
113-
import { GISCUS } from "@/config";
113+
import { GISCUS } from "@/constants";
114114
import { useEffect, useState } from "react";
115115

116116
interface CommentsProps {
@@ -164,7 +164,7 @@ export default function Comments({
164164

165165
This _React_ component not only wraps the native _Giscus_ component, but also introduces additional props, namely `lightTheme` and `darkTheme`. Leveraging two event listeners, the _Giscus_ comments will align with the site's theme, dynamically switching between dark and light themes whenever the site or browser theme is changed.
166166

167-
We also need to define the `GISCUS` config, for which the optimal location is in `src/config.ts`:
167+
We also need to define the `GISCUS` config, for which the optimal location is in `src/constants.ts`:
168168

169169
```ts
170170
import type { GiscusProps } from "@giscus/react";

0 commit comments

Comments
 (0)