diff options
Diffstat (limited to 'src/utils/hooks/use-comments.tsx')
| -rw-r--r-- | src/utils/hooks/use-comments.tsx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/utils/hooks/use-comments.tsx b/src/utils/hooks/use-comments.tsx index 9076888..cb0848b 100644 --- a/src/utils/hooks/use-comments.tsx +++ b/src/utils/hooks/use-comments.tsx @@ -1,4 +1,4 @@ -import { fetchAPI, getAPIUrl } from '@services/graphql/api'; +import { fetchAPI } from '@services/graphql/api'; import { buildCommentsTree, getCommentFromRawData, @@ -24,9 +24,7 @@ const useComments = ({ fallback, }: UseCommentsConfig): Comment[] | undefined => { const { data } = useSWR( - contentId - ? { api: getAPIUrl(), query: commentsQuery, variables: { contentId } } - : null, + contentId ? { query: commentsQuery, variables: { contentId } } : null, fetchAPI<RawComment, typeof commentsQuery> ); |
