-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(sync): keep up to date url and syncSupport in local storage #659
fix(sync): keep up to date url and syncSupport in local storage #659
Conversation
|
||
useEffect( () => { | ||
if ( isAuthenticated ) { | ||
refetchSites(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sejas maybe it's interesting for you, since you were working around fetching sites - before we were fetching sites every time when Sync tab opens, but after latest changes we don't do it any more, instead we fetch them during starting session. So I decided to refetch them when Sync tab opens, to keep data up-to-date. With this PR we are starting syncing data between Studio and wordpress.com, specifically url
and syncSupport
properties. Later I am going to sync staging sites, since adding/remicing them on wordpress.com doesn't reflect it in Studio.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have any particular comment about the code. I've tested those changes, and they work well. This is good to go for me 🚢.
Related issues
Proposed Changes
If user connected website and then something was changed on wordpress.com side - we don't reflect changes to appdata-v1.json.
With this PR we start doing it with
url
andsyncSupport
properties.Later I will handle staging sites in the follow up PR.
Testing Instructions
appdata-v1.json
and assert that you see:appdata-v1.json