Cleanup Old Code#88
Merged
Merged
Conversation
Removed: - context/SearchProvider.tsx (replaced by ToolsProvider) - components/tools/queries/ (React Query hooks no longer needed) - components/tools/listPage/ListPageComponent/ (replaced by StaticListPageComponent) - components/homepage/queries/ (homepage uses repository pattern) - components/blog/queries/ (blog uses direct file access) - components/tools/listPage/ToolsSidebar/FilterCard/utils.ts (inlined in components) API Routes Removed: - pages/api/tools.ts - pages/api/paginated-tools.ts - pages/api/tags/[type].ts - pages/api/tool/[toolId].ts - pages/api/mostViewed.ts - pages/api/popularLanguages.ts Utils-api Removed: - cache.ts (no longer using file cache) - filters.ts (filtering in ToolsFilter class) - tools.ts (replaced by ToolsRepository) - toolsWithVotes.ts (replaced by ToolsRepository.withVotes) - tags.ts (replaced by TagsRepository) - mostViewedTools.ts (replaced by StatsRepository) - popularLanguageStats.ts (replaced by StatsRepository) - toolStats.ts (replaced by StatsRepository) - stars.ts (not used) - github.ts (not used) - urls.ts (not used) Updated: - blog.ts: Removed cache dependency, use direct file access - screenshot.ts: Removed cache dependency, use in-memory cache - query.ts: Removed SearchProvider types, proper TypeScript - pages/languages/index.tsx: Use StatsRepository - pages/tag/[slug].tsx: Remove SearchProvider wrapper - pages/tool/[slug].tsx: Remove SearchProvider wrapper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request removes all client-side React Query hooks and server-side prefetching logic from the
queriesmodules across the blog, homepage, and tools components. The affected files now no longer export any query-related functions, and their corresponding index files have been updated to reflect these removals. Additionally, the infinite scrolling and filter logic previously handled inListPageComponenthas been removed, and some minor adjustments were made to the affiliate card and styling imports.