Open beaulebens opened 6 years ago
We'd likely want to keep the initial behaviour of rendering the layout and spinner while fetching newest-note-data
, but if that comes back a 403, replace the spinner with a message linking to https://wordpress.com/log-in in a new tab.
Another way to handle it might be to check higher up in Notifications
for the wpcom.token
prop, which I don't think would be present if the user is not authenticated. Then it could pass a isAuthenticated: false
to Layout
(eventually getting to NoteList
).
I’d be in favor of checking higher up. If someone is logged out we can prevent them from having to download the entire bundle. This could easily belong in standalone
entirely and do something creative like load HTML if logged out and only load React and the app when logged in.
Note that the bell and menu isn’t even part of this library. We can handle this entirely in the menu bar and cull the loading of the notifications iFrame when not logged in
That all sounds great @dmsnell , even better, will do 👍
I'm going to just reference this other issue: https://github.com/Automattic/jetpack/issues/682
And this Slack conversation: https://a8c.slack.com/archives/C02HLU2CH/p1522186251000449
Options mostly discussed have been: