@terrafirmagreg-team/discussions 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@terrafirmagreg-team/discussions",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "type": "module",
5
5
  "description": "GitHub Discussions comments and feedback",
6
6
  "license": "LGPL-3.0-only",
@@ -18,8 +18,7 @@
18
18
  "./hooks/*": [
19
19
  "./src/hooks/*.ts",
20
20
  "./src/hooks/*/index.ts"
21
- ],
22
- "./locales": "./src/locales.ts"
21
+ ]
23
22
  },
24
23
  "dependencies": {
25
24
  "@floating-ui/react-dom": "^2.1.9",
@@ -27,8 +26,8 @@
27
26
  "@fuma-comment/server": "1.6.0",
28
27
  "@terrafirmagreg-team/auth": "1.2.1",
29
28
  "@terrafirmagreg-team/data": "1.2.1",
30
- "@terrafirmagreg-team/translate": "1.2.2",
31
- "@terrafirmagreg-team/ui": "1.2.1",
29
+ "@terrafirmagreg-team/translate": "1.2.3",
30
+ "@terrafirmagreg-team/ui": "1.2.2",
32
31
  "class-variance-authority": "^0.7.1",
33
32
  "fuma-comment-github-discussions": "1.1.1",
34
33
  "lucide-react": "^0.577.0",
@@ -1,32 +1,32 @@
1
- 'use client';
2
-
3
- import { Comments as FumaComments } from '@fuma-comment/react';
4
- import { useCommentsEnabled } from '../hooks/comments/use-enabled';
5
- import { usePageThread } from '../hooks/comments/use-thread';
6
- import { redirectToCommentsLogin } from '../lib/comments/auth';
7
-
8
- export function Comments({
9
- page,
10
- apiUrl = '/api/comments',
11
- }: {
12
- page?: string;
13
- apiUrl?: string;
14
- }) {
15
- const enabled = useCommentsEnabled(`${apiUrl}/config`);
16
- const thread = usePageThread(page);
17
- if (!enabled) return null;
18
- return (
19
- <div className="not-prose mt-8">
20
- <FumaComments
21
- page={thread}
22
- apiUrl={apiUrl}
23
- auth={{
24
- type: 'api',
25
- signIn: () => redirectToCommentsLogin(apiUrl),
26
- }}
27
- mention={{ enabled: true }}
28
- />
29
- </div>
30
- );
31
- }
32
-
1
+ 'use client';
2
+
3
+ import { Comments as FumaComments } from '@fuma-comment/react';
4
+ import { useCommentsEnabled } from '../hooks/comments/use-enabled';
5
+ import { usePageThread } from '../hooks/comments/use-thread';
6
+ import { redirectToCommentsLogin } from '../lib/comments/auth';
7
+
8
+ export function Comments({
9
+ page,
10
+ apiUrl = '/api/comments',
11
+ }: {
12
+ page?: string;
13
+ apiUrl?: string;
14
+ }) {
15
+ const enabled = useCommentsEnabled(`${apiUrl}/config`);
16
+ const thread = usePageThread(page);
17
+ if (!enabled) return null;
18
+ return (
19
+ <div className="not-prose mt-8">
20
+ <FumaComments
21
+ page={thread}
22
+ apiUrl={apiUrl}
23
+ auth={{
24
+ type: 'api',
25
+ signIn: () => redirectToCommentsLogin(apiUrl),
26
+ }}
27
+ mention={{ enabled: true }}
28
+ />
29
+ </div>
30
+ );
31
+ }
32
+
@@ -1,8 +1,8 @@
1
- import { commentsView, type CommentsViewProps } from '../lib/comments';
2
-
3
- export function CommentsSlot(props: CommentsViewProps) {
4
- const View = commentsView();
5
- // eslint-disable-next-line react-hooks/static-components
6
- return View ? <View {...props} /> : null;
7
- }
8
-
1
+ import { commentsView, type CommentsViewProps } from '../lib/comments';
2
+
3
+ export function CommentsSlot(props: CommentsViewProps) {
4
+ const View = commentsView();
5
+ // eslint-disable-next-line react-hooks/static-components
6
+ return View ? <View {...props} /> : null;
7
+ }
8
+