diff --git a/blog/google-icon-update/index.md b/blog/google-icon-update/index.md
index 4a19d1c6..c4668a8b 100644
--- a/blog/google-icon-update/index.md
+++ b/blog/google-icon-update/index.md
@@ -38,6 +38,7 @@ import TabItem from '@theme/TabItem';
import ZoomImage from '@site/src/components/ZoomImage';
import imgGsuite from './assets/03-google-old-gsuite-logo.png';
import imgWorkspace from './assets/06-googleworkspace-new-logo.png';
+import imgXPost from './assets/10-x-post.png';
@@ -146,7 +147,9 @@ The people who are happy are mostly the ones who experienced the confusion probl
Looking at the new icons directly, here is what stands out:
- [](https://x.com/Gautamk104/status/2057843133392842780?ref_src=twsrc%5Etfw%7Ctwcamp%5Etweetembed%7Ctwterm%5E2057843133392842780%7Ctwgr%5E3dbaf20e8e4f9f64fd6032e85f7ed7c1e1b5fe0f%7Ctwcon%5Es1_c10&ref_url=https%3A%2F%2Fpublish.twitter.com%2F%3Furl%3Dhttps%3A%2F%2Ftwitter.com%2FGautamk104%2Fstatus%2F2057843133392842780)
+
+
+
diff --git a/src/components/BlogSearch/index.tsx b/src/components/BlogSearch/index.tsx
index 3e6d3d9d..660992bd 100644
--- a/src/components/BlogSearch/index.tsx
+++ b/src/components/BlogSearch/index.tsx
@@ -192,7 +192,7 @@ export default function BlogSearch({ initialSearchTerm = "", onSearchSubmit }: B
MATCHING ARTICLES
- {searchResults.articles.map((article, idx) => {
+ {searchResults.articles.map((article) => {
const itemIndex = selectableItems.findIndex((item) => item.label === article.title);
return (
= ({
}
};
- // Get icon for action type
- const getActionIcon = (action: ContributorActivity["action"]): string => {
- switch (action) {
- case "pushed":
- return "🚀";
- case "created":
- return "✨";
- case "merged":
- return "🔄";
- case "opened":
- return "📝";
- case "commented":
- return "💬";
- case "closed":
- return "✅";
- default:
- return "💻";
- }
- };
-
// Get text for action type
const getActionText = (action: ContributorActivity["action"]): string => {
switch (action) {
diff --git a/src/components/blogCarousel/blogCarousel.tsx b/src/components/blogCarousel/blogCarousel.tsx
index 96817110..b4e961e1 100644
--- a/src/components/blogCarousel/blogCarousel.tsx
+++ b/src/components/blogCarousel/blogCarousel.tsx
@@ -82,7 +82,7 @@ export function BlogCarousel() {
>
- );
-}
-
export default function LeaderBoard(): JSX.Element {
// Get time filter functions from context
const {
@@ -349,7 +287,6 @@ export default function LeaderBoard(): JSX.Element {
const renderPaginationButtons = () => {
const pages = [];
- const maxVisibleButtons = 5; // Maximum number of page buttons to show directly
// Special case: if we have 7 or fewer pages, show all of them without ellipsis
if (totalPages <= 7) {
@@ -448,22 +385,6 @@ export default function LeaderBoard(): JSX.Element {
return "regular";
};
- // Helper function for time filter display
- const getTimeFilterLabel = (filter: string) => {
- switch (filter) {
- case "week":
- return "📊 This Week";
- case "month":
- return "📆 This Month";
- case "year":
- return "📅 This Year";
- case "all":
- return "🏆 All Time";
- default:
- return "🏆 All Time";
- }
- };
-
return (
@@ -498,7 +419,7 @@ export default function LeaderBoard(): JSX.Element {
value={currentTimeFilter}
onChange={(e) => {
// Use setTimeFilter from context
- setTimeFilter(e.target.value as any);
+ setTimeFilter(e.target.value as TimeFilter);
setCurrentPage(1);
setIsSelectChanged(true);
setTimeout(() => setIsSelectChanged(false), 1200);
diff --git a/src/components/faqs/faqs.tsx b/src/components/faqs/faqs.tsx
index 3ea57d3c..f522d3d4 100644
--- a/src/components/faqs/faqs.tsx
+++ b/src/components/faqs/faqs.tsx
@@ -44,7 +44,7 @@ const faqData = [
const FAQs: React.FC = () => {
const [activeIndex, setActiveIndex] = useState(null);
- const { colorMode, isDark } = useSafeColorMode();
+ const { isDark } = useSafeColorMode();
const toggleAccordion = (index: number) => {
setActiveIndex(activeIndex === index ? null : index);
diff --git a/src/components/navbar/NavbarIconInjector.tsx b/src/components/navbar/NavbarIconInjector.tsx
index d11e8503..ba4a571c 100644
--- a/src/components/navbar/NavbarIconInjector.tsx
+++ b/src/components/navbar/NavbarIconInjector.tsx
@@ -1,5 +1,5 @@
import React, { useEffect } from "react";
-import { createRoot } from "react-dom/client";
+import { createRoot, type Root } from "react-dom/client";
import NavbarIcon from "./NavbarIcon";
import {
NAVBAR_ICONS,
@@ -8,7 +8,7 @@ import {
export default function NavbarIconInjector() {
useEffect(() => {
- const roots = new Map();
+ const roots = new Map();
NAVBAR_ICONS.forEach((name: NavbarIconName) => {
const id = `nav-${name.toLowerCase()}`;
diff --git a/src/components/ourProjects.tsx b/src/components/ourProjects.tsx
index 3b8c2b00..29511fb4 100644
--- a/src/components/ourProjects.tsx
+++ b/src/components/ourProjects.tsx
@@ -50,7 +50,7 @@ export interface Props {
const ShowcasePage: React.FC = ({
Data: legacyData,
}) => {
- const { colorMode, isDark } = useSafeColorMode();
+ const { isDark } = useSafeColorMode();
// Use JSON data by default, fallback to legacy props for backward compatibility
// Convert legacy data to new format if needed
@@ -169,8 +169,6 @@ const SelectComponent = ({
isDark: boolean;
}) => {
const [activeItem, setActiveItem] = useState(0);
- const [isHovered, setIsHovered] = useState(false);
-
return (
= ({
const { isDark } = useSafeColorMode();
const borderClr = isDark ? "rgba(255,255,255,0.06)" : "rgba(0,0,0,0.07)";
- const mutedClr = isDark
- ? "rgba(148,163,184,0.55)"
- : "rgba(100,116,139,0.65)";
const subtleClr = isDark
? "rgba(148,163,184,0.35)"
: "rgba(100,116,139,0.45)";
@@ -324,4 +321,4 @@ const TopMateCard: React.FC = ({
);
};
-export default TopMateCard;
\ No newline at end of file
+export default TopMateCard;
diff --git a/src/database/blogs/index.tsx b/src/database/blogs/index.tsx
index b5b2c5ff..169865d8 100644
--- a/src/database/blogs/index.tsx
+++ b/src/database/blogs/index.tsx
@@ -7,6 +7,7 @@ interface Blog {
authors: string[];
category: string;
tags?: string[];
+ date?: string;
}
const blogs: Blog[] = [
diff --git a/src/lib/statsProvider.tsx b/src/lib/statsProvider.tsx
index 923c16c5..7bcb6249 100644
--- a/src/lib/statsProvider.tsx
+++ b/src/lib/statsProvider.tsx
@@ -7,7 +7,7 @@ import React, {
useState,
type ReactNode,
} from "react";
-import { githubService, type GitHubOrgStats } from "../services/githubService";
+import { githubService } from "../services/githubService";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
// Time filter types
@@ -78,6 +78,11 @@ interface PullRequestItem {
labels?: Array<{ name: string }>;
}
+interface OrgRepository {
+ name: string;
+ archived: boolean;
+}
+
// Enhanced contributor type for internal processing (stores all PRs)
interface FullContributor extends Omit {
allPRDetails: PRDetails[]; // All PRs regardless of filter
@@ -94,7 +99,6 @@ interface CommunityStatsProviderProps {
}
const GITHUB_ORG = "recodehive";
-const POINTS_PER_PR = 10;
const MAX_CONCURRENT_REQUESTS = 15;
const CACHE_DURATION = 20 * 60 * 1000; // 20 minutes cache
const MAX_PAGES_PER_REPO = 10;
@@ -253,7 +257,7 @@ export function CommunityStatsProvider({
const fetchAllOrgRepos = useCallback(
async (headers: Record) => {
- const repos: any[] = [];
+ const repos: OrgRepository[] = [];
let page = 1;
while (true) {
const resp = await fetch(
@@ -267,7 +271,7 @@ export function CommunityStatsProvider({
`Failed to fetch org repos: ${resp.status} ${resp.statusText}`,
);
}
- const data = await resp.json();
+ const data: OrgRepository[] = await resp.json();
repos.push(...data);
if (!Array.isArray(data) || data.length < 100) break;
page++;
@@ -337,7 +341,7 @@ export function CommunityStatsProvider({
// Enhanced processing function that stores only valid PRs with points
const processBatch = useCallback(
async (
- repos: any[],
+ repos: OrgRepository[],
headers: Record,
): Promise<{
contributorMap: Map;
@@ -479,8 +483,8 @@ export function CommunityStatsProvider({
},
timestamp: now,
});
- } catch (err: any) {
- if (err.name !== "AbortError") {
+ } catch (err: unknown) {
+ if (!(err instanceof DOMException && err.name === "AbortError")) {
console.error("Error fetching GitHub organization stats:", err);
setError(
err instanceof Error ? err.message : "Failed to fetch GitHub stats",
diff --git a/src/pages/License/index.tsx b/src/pages/License/index.tsx
index d1a02dad..7d6f70ba 100644
--- a/src/pages/License/index.tsx
+++ b/src/pages/License/index.tsx
@@ -1,6 +1,5 @@
import React from "react";
import Layout from "@theme/Layout";
-import Link from "@docusaurus/Link";
import "./index.css";
const Licensing: React.FC = () => {
diff --git a/src/pages/badges/github-badges.tsx b/src/pages/badges/github-badges.tsx
index b65fb12b..44384320 100644
--- a/src/pages/badges/github-badges.tsx
+++ b/src/pages/badges/github-badges.tsx
@@ -1,9 +1,7 @@
import React, { useEffect, useState } from "react";
import Head from "@docusaurus/Head";
-import { motion, HTMLMotionProps } from "framer-motion";
-import type { ReactElement } from "react";
+import { motion } from "framer-motion";
import Layout from "@theme/Layout";
-import { useColorMode } from "@docusaurus/theme-common";
import ExecutionEnvironment from "@docusaurus/ExecutionEnvironment";
// Safe hook for color mode that handles SSR
@@ -34,13 +32,8 @@ function useSafeColorMode() {
}
import styles from "./github-badges.module.css";
-type MotionDivProps = HTMLMotionProps<"div">;
-type MotionTrProps = HTMLMotionProps<"tr">;
-
-import Link from "@docusaurus/Link";
-
const GithubBadgesContent = (): React.ReactElement => {
- const { colorMode, isDark, mounted } = useSafeColorMode();
+ const { isDark } = useSafeColorMode();
// Scroll to top button logic
useEffect(() => {
@@ -66,10 +59,6 @@ const GithubBadgesContent = (): React.ReactElement => {
return () => window.removeEventListener("scroll", handleScroll);
}, []);
- const handleScrollToTop = () => {
- window.scrollTo({ top: 0, behavior: "smooth" });
- };
-
return (
{
);
};
-const handleScrollToTop = () => {
- window.scrollTo({ top: 0, behavior: "smooth" });
-};
-
const GithubBadges = (): React.ReactElement => {
return ;
};
diff --git a/src/pages/blogs/index.tsx b/src/pages/blogs/index.tsx
index c429b31d..1a9004e2 100644
--- a/src/pages/blogs/index.tsx
+++ b/src/pages/blogs/index.tsx
@@ -236,8 +236,8 @@ const BlogCard = ({ blog }: { blog: (typeof blogs)[number] }) => {
// Tags — use blog.tags if present, fallback to blog.category as single tag
const tags: string[] =
- Array.isArray((blog as any).tags) && (blog as any).tags.length > 0
- ? (blog as any).tags
+ Array.isArray(blog.tags) && blog.tags.length > 0
+ ? blog.tags
: blog.category
? [blog.category]
: [];
@@ -347,8 +347,8 @@ const BlogCard = ({ blog }: { blog: (typeof blogs)[number] }) => {
))}
)}
- {(blog as any).date && (
- {formatDate((blog as any).date)}
+ {blog.date && (
+ {formatDate(blog.date)}
)}