diff --git a/frontend/__tests__/unit/components/RecentIssues.test.tsx b/frontend/__tests__/unit/components/RecentIssues.test.tsx
index 46e3476835..8cafe13069 100644
--- a/frontend/__tests__/unit/components/RecentIssues.test.tsx
+++ b/frontend/__tests__/unit/components/RecentIssues.test.tsx
@@ -174,7 +174,13 @@ describe('', () => {
})
it('renders with missing props gracefully', () => {
- render()
+ const minimalIssue: Issue = {
+ createdAt: 1704067200000,
+ title: '',
+ url: '',
+ objectID: 'minimal-issue',
+ }
+ render()
expect(screen.getByText('Recent Issues')).toBeInTheDocument()
})
diff --git a/frontend/__tests__/unit/pages/ChapterDetails.test.tsx b/frontend/__tests__/unit/pages/ChapterDetails.test.tsx
index 722bc914f9..978f55026a 100644
--- a/frontend/__tests__/unit/pages/ChapterDetails.test.tsx
+++ b/frontend/__tests__/unit/pages/ChapterDetails.test.tsx
@@ -104,7 +104,8 @@ describe('chapterDetailsPage Component', () => {
...mockChapterDetailsData,
topContributors: [
{
- name: 'Contributor 1',
+ login: 'contributor1',
+ name: '',
avatarUrl: 'https://example.com/avatar1.jpg',
},
],
@@ -116,7 +117,7 @@ describe('chapterDetailsPage Component', () => {
render()
await waitFor(() => {
- expect(screen.getByText('Contributor 1')).toBeInTheDocument()
+ expect(screen.getByText('Contributor1')).toBeInTheDocument()
})
})
test('renders chapter sponsor block correctly', async () => {
diff --git a/frontend/__tests__/unit/pages/Header.test.tsx b/frontend/__tests__/unit/pages/Header.test.tsx
index e12116319b..79c9a04cf9 100644
--- a/frontend/__tests__/unit/pages/Header.test.tsx
+++ b/frontend/__tests__/unit/pages/Header.test.tsx
@@ -81,8 +81,12 @@ jest.mock('components/NavDropDown', () => {
return (
{link.text}
- {link.submenu?.map((sub: { href: string; text: string }, i: number) => (
-
+ {link.submenu?.map((sub: { href: string; text: string }) => (
+
{sub.text}
))}
diff --git a/frontend/src/app/about/page.tsx b/frontend/src/app/about/page.tsx
index 0f0b9549fb..243582fde5 100644
--- a/frontend/src/app/about/page.tsx
+++ b/frontend/src/app/about/page.tsx
@@ -51,26 +51,24 @@ const leaders = {
const projectKey = 'nest'
const About = () => {
- const {
- data: projectMetadataResponse,
- error: projectMetadataRequestError,
- loading: projectMetadataLoading,
- } = useQuery(GetProjectMetadataDocument, {
- variables: { key: projectKey },
- })
+ const { data: projectMetadataResponse, error: projectMetadataRequestError } = useQuery(
+ GetProjectMetadataDocument,
+ {
+ variables: { key: projectKey },
+ }
+ )
- const {
- data: topContributorsResponse,
- error: topContributorsRequestError,
- loading: topContributorsLoading,
- } = useQuery(GetTopContributorsDocument, {
- variables: {
- excludedUsernames: Object.keys(leaders),
- hasFullName: true,
- key: projectKey,
- limit: 24,
- },
- })
+ const { data: topContributorsResponse, error: topContributorsRequestError } = useQuery(
+ GetTopContributorsDocument,
+ {
+ variables: {
+ excludedUsernames: Object.keys(leaders),
+ hasFullName: true,
+ key: projectKey,
+ limit: 24,
+ },
+ }
+ )
const { leadersData, isLoading: leadersLoading } = useLeadersData()
@@ -97,7 +95,12 @@ const About = () => {
}
}, [topContributorsResponse, topContributorsRequestError])
- const isLoading = projectMetadataLoading || topContributorsLoading || leadersLoading
+ const isLoading =
+ !projectMetadataResponse ||
+ !topContributorsResponse ||
+ (projectMetadataRequestError && !projectMetadata) ||
+ (topContributorsRequestError && !topContributors) ||
+ leadersLoading
if (isLoading) {
return
@@ -251,8 +254,15 @@ const About = () => {
)}
}>
- {projectStory.map((text, index) => (
-
+ {projectStory.map((text) => (
+
diff --git a/frontend/src/app/members/[memberKey]/page.tsx b/frontend/src/app/members/[memberKey]/page.tsx
index 5936f9609f..e4a56e148d 100644
--- a/frontend/src/app/members/[memberKey]/page.tsx
+++ b/frontend/src/app/members/[memberKey]/page.tsx
@@ -82,7 +82,7 @@ const UserDetailsPage: React.FC = () => {
const username = mentionMatch[1]
const punctuation = mentionMatch[2] || ''
return (
-
+
{
)
}
- return {word}
+ return {word}
})
if (isLoading) {
diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx
index 96ae9e7226..62ea930d0f 100644
--- a/frontend/src/app/page.tsx
+++ b/frontend/src/app/page.tsx
@@ -357,8 +357,8 @@ export default function Home() {
- {counterData.map((stat, index) => (
-
+ {counterData.map((stat) => (
+
+
diff --git a/frontend/src/components/CardDetailsPage.tsx b/frontend/src/components/CardDetailsPage.tsx
index ca2055cebb..cc68d264ed 100644
--- a/frontend/src/components/CardDetailsPage.tsx
+++ b/frontend/src/components/CardDetailsPage.tsx
@@ -156,8 +156,8 @@ const DetailsCard = ({
title={
}
className="md:col-span-2"
>
- {stats.map((stat, index) => (
-
+ {stats.map((stat) => (
+
{
Social Links
- {urls.map((url, index) => (
+ {urls.map((url) => (
- {section.links.map((link, index) => (
-
+ {section.links.map((link) => (
+
{link.isSpan ? (
{link.text}
) : (
diff --git a/frontend/src/components/Header.tsx b/frontend/src/components/Header.tsx
index d653ac4514..854d187002 100644
--- a/frontend/src/components/Header.tsx
+++ b/frontend/src/components/Header.tsx
@@ -91,9 +91,9 @@ export default function Header({ isGitHubAuthEnabled }: { readonly isGitHubAuthE
}
return true
})
- .map((link, i) => {
+ .map((link) => {
return link.submenu ? (
-
+
) : (
- {link.submenu.map((sub, i) => (
+ {link.submenu.map((sub) => (
{data.map((item, index) => (
-
+
{showAvatar && (
diff --git a/frontend/src/components/MultiSearch.tsx b/frontend/src/components/MultiSearch.tsx
index 4643ae98e3..a94c57f80c 100644
--- a/frontend/src/components/MultiSearch.tsx
+++ b/frontend/src/components/MultiSearch.tsx
@@ -264,7 +264,7 @@ const MultiSearchBar: React.FC
= ({
{suggestion.hits.map((hit, subIndex) => (
-
{link.submenu.map((submenu, idx) => (
= ({
Prev
{pageNumbers.map((number, index) => (
-
+
{number === '...' ? (
= ({
- {data.map((item, index) => (
-
+ {data.map((item) => (
+
))}
) : (
diff --git a/frontend/src/components/RepositoryCard.tsx b/frontend/src/components/RepositoryCard.tsx
index b013210871..02450e2f61 100644
--- a/frontend/src/components/RepositoryCard.tsx
+++ b/frontend/src/components/RepositoryCard.tsx
@@ -22,8 +22,8 @@ const RepositoryCard: React.FC = ({
return (
- {displayedRepositories.map((repository, index) => {
- return
+ {displayedRepositories.map((repository) => {
+ return
})}
{repositories.length > maxInitialDisplay &&
}
diff --git a/frontend/src/components/SkeletonsBase.tsx b/frontend/src/components/SkeletonsBase.tsx
index b542712128..233177a739 100644
--- a/frontend/src/components/SkeletonsBase.tsx
+++ b/frontend/src/components/SkeletonsBase.tsx
@@ -8,7 +8,7 @@ function userCardRender() {
return (
{Array.from({ length: cardCount }).map((_, index) => (
-
+
))}
)
diff --git a/frontend/src/components/ToggleableList.tsx b/frontend/src/components/ToggleableList.tsx
index 041532dcac..de49828949 100644
--- a/frontend/src/components/ToggleableList.tsx
+++ b/frontend/src/components/ToggleableList.tsx
@@ -36,9 +36,9 @@ const ToggleableList = ({
- {(showAll ? items : items.slice(0, limit)).map((item, index) => (
+ {(showAll ? items : items.slice(0, limit)).map((item) => (