Commit 88b7a8f
authored
Cleanup Old Code (#88)
* Cleanup: Remove old code replaced by repository pattern
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
* Refactor AffiliateCard links to use Link component directly1 parent c97d2f9 commit 88b7a8f
41 files changed
Lines changed: 148 additions & 2154 deletions
File tree
- components
- affiliates/AffiliateCard
- blog/queries
- homepage/queries
- tools
- listPage
- ListPageComponent
- StaticListPageComponent
- ToolsSidebar/FilterCard
- queries
- context
- pages
- api
- tags
- tool
- languages
- tag
- tool
- utils-api
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
40 | 38 | | |
41 | 39 | | |
42 | 40 | | |
| |||
45 | 43 | | |
46 | 44 | | |
47 | 45 | | |
48 | | - | |
49 | 46 | | |
50 | 47 | | |
| 48 | + | |
51 | 49 | | |
52 | 50 | | |
53 | 51 | | |
| |||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments