From a405f71ed668a455df5ebb6fd23605c1e2808fec Mon Sep 17 00:00:00 2001 From: Srushti-Kamble Date: Sat, 30 May 2026 12:48:52 +0530 Subject: [PATCH 1/2] fixed importing the image --- blog/google-icon-update/index.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/blog/google-icon-update/index.md b/blog/google-icon-update/index.md index 7e06a97e..766e43b4 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'; @@ -142,7 +143,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: - [![Github](./assets/10-x-post.png)](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) + + X post about the Google Workspace icon update + From e6bb6705d04f2b287a87b18effb0b458b9cf59bf Mon Sep 17 00:00:00 2001 From: Srushti-Kamble Date: Sun, 31 May 2026 13:30:42 +0530 Subject: [PATCH 2/2] fix: resolve TypeScript ESLint warnings --- src/components/BlogSearch/index.tsx | 2 +- src/components/Community/index.tsx | 2 +- src/components/FloatingContributors/index.tsx | 20 ----- src/components/blogCarousel/blogCarousel.tsx | 4 +- .../dashboard/LeaderBoard/leaderboard.tsx | 83 +------------------ src/components/faqs/faqs.tsx | 2 +- src/components/navbar/NavbarIconInjector.tsx | 4 +- src/components/ourProjects.tsx | 4 +- .../testimonials/TestimonialCard.tsx | 2 +- src/components/topmate/TopMateCard.tsx | 5 +- src/database/blogs/index.tsx | 1 + src/lib/statsProvider.tsx | 18 ++-- src/pages/License/index.tsx | 1 - src/pages/badges/github-badges.tsx | 19 +---- src/pages/blogs/index.tsx | 8 +- src/pages/broadcasts/index.tsx | 2 - src/pages/careers/index.tsx | 4 +- src/pages/courses/index.tsx | 4 +- src/pages/dashboard/giveaway/index.tsx | 2 +- src/pages/ebooks/index.tsx | 6 +- src/pages/get-started/index.tsx | 15 +--- src/pages/our-sponsors/index.tsx | 3 - src/pages/podcasts/details.tsx | 4 +- src/pages/showcase/index.tsx | 2 +- src/plugins/tailwind-plugin.ts | 2 +- src/services/githubService.ts | 59 +++++++++++-- src/theme/ColorModeToggle/index.tsx | 2 +- src/theme/DocSidebar/Desktop/index.tsx | 17 +--- src/theme/DocSidebarItem/Html/index.tsx | 4 - src/theme/DocSidebarItem/Link/index.tsx | 6 +- src/theme/Footer/Layout/index.tsx | 1 - 31 files changed, 102 insertions(+), 206 deletions(-) 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() { >
); -} \ No newline at end of file +} diff --git a/src/components/dashboard/LeaderBoard/leaderboard.tsx b/src/components/dashboard/LeaderBoard/leaderboard.tsx index c4738056..557a4d57 100644 --- a/src/components/dashboard/LeaderBoard/leaderboard.tsx +++ b/src/components/dashboard/LeaderBoard/leaderboard.tsx @@ -11,6 +11,7 @@ import { mockContributors } from "./mockData"; import "./leaderboard.css"; const GITHUB_ORG = "recodehive"; +type TimeFilter = "week" | "month" | "year" | "all"; // Users to exclude from the leaderboard const EXCLUDED_USERS = [ @@ -44,12 +45,6 @@ interface Contributor { badges?: string[]; // Array of badge image paths } -interface Stats { - flooredTotalPRs: number; - totalContributors: number; - flooredTotalPoints: number; -} - // Badge configuration - maps badge numbers to achievement criteria const BADGE_CONFIG = [ { @@ -212,63 +207,6 @@ function Badge({ ); } -function TopPerformerCard({ - contributor, - rank, - onPRClick, - onBadgeClick, -}: { - contributor: Contributor; - rank: number; - onPRClick: (contributor: Contributor) => void; - onBadgeClick?: (contributor: Contributor) => void; -}) { - const { isDark } = useSafeColorMode(); - const rankClass = rank === 1 ? "top-1" : rank === 2 ? "top-2" : "top-3"; - const badges = getContributorBadges(contributor, rank); - - return ( -
- {contributor.username} -
- {rank} -
-
- - {contributor.username} - - onBadgeClick?.(contributor)} - /> -
- onPRClick(contributor)} - clickable={true} - /> - -
-
-
- ); -} - 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)} )}
diff --git a/src/pages/broadcasts/index.tsx b/src/pages/broadcasts/index.tsx index 4d76ef9c..ec2d98ef 100644 --- a/src/pages/broadcasts/index.tsx +++ b/src/pages/broadcasts/index.tsx @@ -246,8 +246,6 @@ function BroadcastsPage(): ReactElement { const regularVideos = videoData.filter((video) => video.type === "video"); const liveVideos = videoData.filter((video) => video.type === "live"); - const otherVideos = videoData.filter((video) => video.type === "other"); - const indexOfLastVideo = currentPage * videosPerPage; const indexOfFirstVideo = indexOfLastVideo - videosPerPage; diff --git a/src/pages/careers/index.tsx b/src/pages/careers/index.tsx index 0392dac3..61a2d105 100644 --- a/src/pages/careers/index.tsx +++ b/src/pages/careers/index.tsx @@ -1,4 +1,4 @@ -import React, { useState, useRef, useEffect } from "react"; +import React, { useState, useEffect } from "react"; import Layout from "@theme/Layout"; import Head from "@docusaurus/Head"; import { motion } from "framer-motion"; @@ -221,7 +221,7 @@ function TestimonialAvatar({ avatar, name }: { avatar?: string; name: string }) } function CareersContent() { - const { colorMode, isDark, mounted } = useSafeColorMode(); + const { isDark, mounted } = useSafeColorMode(); const [activeTestimonial, setActiveTestimonial] = useState(0); useEffect(() => { diff --git a/src/pages/courses/index.tsx b/src/pages/courses/index.tsx index 4bea85ae..727cc27c 100644 --- a/src/pages/courses/index.tsx +++ b/src/pages/courses/index.tsx @@ -121,6 +121,8 @@ const courses = [ }, ]; +type Course = (typeof courses)[number]; + const topics = [ "ETL", @@ -304,7 +306,7 @@ function CoursesContent() { return () => observer.disconnect(); }, [isStatsVisible]); - const handleCourseClick = (course: any) => { + const handleCourseClick = (course: Course) => { if (course.title.includes("Coming Soon")) { setModal({ open: true, content: "This course is coming soon!" }); } else { diff --git a/src/pages/dashboard/giveaway/index.tsx b/src/pages/dashboard/giveaway/index.tsx index b2099c59..09613582 100644 --- a/src/pages/dashboard/giveaway/index.tsx +++ b/src/pages/dashboard/giveaway/index.tsx @@ -767,7 +767,7 @@ const GiveawayPage: React.FC = () => {
) : (
- {leaderboard.map((entry, index) => ( + {leaderboard.map((entry) => ( ("all"); + const [selectedFilter, setSelectedFilter] = useState("all"); const [favorites, setFavorites] = useState(() => { if (typeof window !== "undefined") { const saved = localStorage.getItem("ebook-favorites"); @@ -211,7 +209,7 @@ export default function Ebooks(): ReactElement {