Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1698448

Browse files
committed
fix(app): new layout sessions stale
1 parent 564d3ed commit 1698448

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

packages/app/src/pages/layout.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,7 @@ export default function Layout(props: ParentProps) {
13511351
}}
13521352
style={{ width: sidebarProps.mobile ? undefined : `${Math.max(layout.sidebar.width() - 64, 0)}px` }}
13531353
>
1354-
<Show when={project()}>
1354+
<Show when={project()} keyed>
13551355
{(p) => (
13561356
<>
13571357
<div class="shrink-0 px-2 py-1">
@@ -1373,16 +1373,16 @@ export default function Layout(props: ParentProps) {
13731373
/>
13741374
<DropdownMenu.Portal>
13751375
<DropdownMenu.Content>
1376-
<DropdownMenu.Item onSelect={() => dialog.show(() => <DialogEditProject project={p()} />)}>
1376+
<DropdownMenu.Item onSelect={() => dialog.show(() => <DialogEditProject project={p} />)}>
13771377
<DropdownMenu.ItemLabel>Edit project</DropdownMenu.ItemLabel>
13781378
</DropdownMenu.Item>
1379-
<DropdownMenu.Item onSelect={() => closeProject(p().worktree)}>
1379+
<DropdownMenu.Item onSelect={() => closeProject(p.worktree)}>
13801380
<DropdownMenu.ItemLabel>Close project</DropdownMenu.ItemLabel>
13811381
</DropdownMenu.Item>
13821382
<DropdownMenu.Separator />
1383-
<DropdownMenu.Item onSelect={() => layout.sidebar.toggleWorkspaces(p().worktree)}>
1383+
<DropdownMenu.Item onSelect={() => layout.sidebar.toggleWorkspaces(p.worktree)}>
13841384
<DropdownMenu.ItemLabel>
1385-
{layout.sidebar.workspaces(p().worktree)() ? "Disable workspaces" : "Enable workspaces"}
1385+
{layout.sidebar.workspaces(p.worktree)() ? "Disable workspaces" : "Enable workspaces"}
13861386
</DropdownMenu.ItemLabel>
13871387
</DropdownMenu.Item>
13881388
</DropdownMenu.Content>
@@ -1392,7 +1392,7 @@ export default function Layout(props: ParentProps) {
13921392
</div>
13931393

13941394
<Show
1395-
when={layout.sidebar.workspaces(p().worktree)()}
1395+
when={layout.sidebar.workspaces(p.worktree)()}
13961396
fallback={
13971397
<>
13981398
<div class="py-4 px-3">
@@ -1401,15 +1401,15 @@ export default function Layout(props: ParentProps) {
14011401
icon="plus-small"
14021402
class="w-full"
14031403
onClick={() => {
1404-
navigate(`/${base64Encode(p().worktree)}/session`)
1404+
navigate(`/${base64Encode(p.worktree)}/session`)
14051405
layout.mobileSidebar.hide()
14061406
}}
14071407
>
14081408
New session
14091409
</Button>
14101410
</div>
14111411
<div class="flex-1 min-h-0">
1412-
<LocalWorkspace project={p()} mobile={sidebarProps.mobile} />
1412+
<LocalWorkspace project={p} mobile={sidebarProps.mobile} />
14131413
</div>
14141414
</>
14151415
}
@@ -1438,7 +1438,7 @@ export default function Layout(props: ParentProps) {
14381438
<SortableProvider ids={workspaces()}>
14391439
<For each={workspaces()}>
14401440
{(directory) => (
1441-
<SortableWorkspace directory={directory} project={p()} mobile={sidebarProps.mobile} />
1441+
<SortableWorkspace directory={directory} project={p} mobile={sidebarProps.mobile} />
14421442
)}
14431443
</For>
14441444
</SortableProvider>

0 commit comments

Comments
 (0)