fix: address code review issues in session sharing
- Add useCallback for loadShares in ShareSessionModal (React hook deps) - Use TreeStructure type instead of Record<string, unknown> for type safety - Fix login redirect format to match LoginPage's expected state shape Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -97,7 +97,7 @@ export function SharedSessionPage() {
|
||||
const status = err.response?.status
|
||||
if (status === 401) {
|
||||
navigate('/login', {
|
||||
state: { from: `/share/${shareToken}` },
|
||||
state: { from: { pathname: `/share/${shareToken}` } },
|
||||
replace: true,
|
||||
})
|
||||
return
|
||||
@@ -232,7 +232,7 @@ export function SharedSessionPage() {
|
||||
<div className="lg:col-span-2">
|
||||
<SessionTimeline
|
||||
decisions={data.decisions}
|
||||
treeType={data.tree_structure?.tree_type as string}
|
||||
treeType={data.tree_structure?.tree_type}
|
||||
startedAt={data.started_at}
|
||||
completedAt={data.completed_at}
|
||||
showCopyButtons={false}
|
||||
|
||||
Reference in New Issue
Block a user