From 2e5b9aa4a90be105528ee22ee836d01a9732c1c0 Mon Sep 17 00:00:00 2001 From: Innei Date: Tue, 4 Jun 2024 20:40:03 +0800 Subject: [PATCH] fix: link card github pr parser Signed-off-by: Innei --- src/components/ui/link-card/LinkCard.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ui/link-card/LinkCard.tsx b/src/components/ui/link-card/LinkCard.tsx index 632057f940..87f1a393e8 100644 --- a/src/components/ui/link-card/LinkCard.tsx +++ b/src/components/ui/link-card/LinkCard.tsx @@ -1,10 +1,10 @@ -import type React from 'react' import { useCallback, useMemo, useState } from 'react' import { useInView } from 'react-intersection-observer' import { m, useMotionTemplate, useMotionValue } from 'framer-motion' import Link from 'next/link' import RemoveMarkdown from 'remove-markdown' import uniqolor from 'uniqolor' +import type React from 'react' import type { FC, ReactNode, SyntheticEvent } from 'react' import { simpleCamelcaseKeys as camelcaseKeys } from '@mx-space/api-client' @@ -350,7 +350,7 @@ const fetchGitHubPRData: FetchObject = { return parts.length === 3 && parts.every((part) => part.length > 0) }, fetch: async (id, setCardInfo, setFullUrl) => { - const [owner, repo, , prNumber] = id.split('/') + const [owner, repo, prNumber] = id.split('/') try { const response = await fetchGitHubApi( `https://api.github.com/repos/${owner}/${repo}/pulls/${prNumber}`,