diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-11-09 15:35:25 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-09 15:35:25 -0800 |
commit | fb4f5709c43c070653c917e3196b9b1c120418a6 (patch) | |
tree | 74e6ff954441b6da3044853e16ebf5dd12213c87 /src/state/session/index.tsx | |
parent | 625cbc435f15bc0d611661b44dbf8add990dff7d (diff) | |
download | voidsky-fb4f5709c43c070653c917e3196b9b1c120418a6.tar.zst |
Refactor post threads to use react query (#1851)
* Add post and post-thread queries * Update PostThread components to use new queries * Move from normalized cache to shadow cache model * Merge post shadow into the post automatically * Remove dead code * Remove old temporary session * Fix: set agent on session creation * Temporarily double-login * Handle post-thread uri resolution errors
Diffstat (limited to 'src/state/session/index.tsx')
-rw-r--r-- | src/state/session/index.tsx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/state/session/index.tsx b/src/state/session/index.tsx index 0f3118168..8e1f9c1a1 100644 --- a/src/state/session/index.tsx +++ b/src/state/session/index.tsx @@ -186,6 +186,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) { }), ) + setState(s => ({...s, agent})) upsertAccount(account) logger.debug(`session: logged in`, { @@ -238,6 +239,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) { }), ) + setState(s => ({...s, agent})) upsertAccount(account) }, [upsertAccount], |