Skip to content

refactor(react-query): unify data layer and add weekly + image-upload support#9

Open
cto-new[bot] wants to merge 3 commits into
mainfrom
refactor-phase-2-continue-e02
Open

refactor(react-query): unify data layer and add weekly + image-upload support#9
cto-new[bot] wants to merge 3 commits into
mainfrom
refactor-phase-2-continue-e02

Conversation

@cto-new

@cto-new cto-new Bot commented Nov 14, 2025

Copy link
Copy Markdown
Contributor

Summary

  • Unifies data fetching through React Query across content, category, tag, analytics, weekly data, and image upload workflows.
  • Introduces weekly-api.ts and backward-compatible shims; adds image upload hooks and exports for single/multiple uploads.
  • Aligns MarkdownPreview/MarkdownEditor typings for content preview data and preserves compatibility with existing rendering paths.

Details

  • Centralizes data fetching via a unified, pure-function service layer for content, category, tag, and analytics with backward-compatible wrappers.
  • Adds weekly API module (weekly-api.ts) and adapts weekly queries to consume new API types; maintains compatibility with existing interfaces.
  • Extends query surface with image upload capabilities: new hooks useImageUpload/useMultipleImageUpload, compress/thumbnail mutations; exports ImageUploadService and aliases for convenience.
  • Improves type coverage for Markdown-based previews and aligns content preview data shape (title, content, content_type, category, tags).
  • Updates planning/documentation to reflect the new architecture and provide guidance for future refactors.

cto-new Bot added 3 commits November 14, 2025 01:43
… support

This change migrates the data fetching layer to a unified React Query-based approach and adds support for weekly data and image uploads.

- Introduce weekly-api.ts to centralize weekly endpoints and backward-compatible service shim
- Add useImageUploadQueries.ts and export hooks for single and multi image uploads
- Update weekly query hooks to consume the new weekly API types
- Fix TypeScript typing issues in MarkdownPreview/MarkdownEditor to align content preview data
- Provide backward-compatible wrappers to minimize breaking changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants