Skip to content

Conversation

@fredrikekelund
Copy link
Contributor

Related issues

Proposed Changes

In #2083, we implemented a manual refetch of the list of connected sites when users log in to Studio. This prompted me to look into refactoring the state tree to use RTK Query instead, because with RTK Query, queries are automatically re-evaluated whenever a dependency changes (e.g., the currently logged-in user).

This PR does the following:

  • Adds src/stores/sync/connected-sites-api.ts with an RTK Query API
  • Removes src/stores/sync/connected-sites-hooks.ts and src/stores/sync/connected-sites-slice.ts
  • Updates all the consumers of those files to use the new approach instead
  • The modal open state and modal mode are now stored as component state in src/modules/sync/index.tsx. We don't have to go this way—we could keep it in the state tree if needed—but in my light testing, this approach worked fine.

Testing Instructions

TBD

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@fredrikekelund fredrikekelund requested review from a team, epeicher and sejas November 19, 2025 15:34
@fredrikekelund fredrikekelund self-assigned this Nov 19, 2025
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.

2 participants