Skip to content

Commit 81ee2d2

Browse files
committed
fix(desktop): prompting
1 parent 85974e9 commit 81ee2d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/desktop/src/pages/layout.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ export default function Layout(props: ParentProps) {
2222
const layout = useLayout()
2323
const currentDirectory = createMemo(() => base64Decode(params.dir ?? ""))
2424
const sessions = createMemo(() => globalSync.child(currentDirectory())[0].session ?? [])
25-
const currentSession = createMemo(() => sessions().find((s) => s.id === params.id) ?? sessions().at(0))
25+
const currentSession = createMemo(() => sessions().find((s) => s.id === params.id))
2626

2727
function navigateToSession(session: Session | undefined) {
28+
if (!session) return
2829
navigate(`/${params.dir}/session/${session?.id}`)
2930
}
3031

@@ -59,6 +60,7 @@ export default function Layout(props: ParentProps) {
5960
<Select
6061
options={sessions()}
6162
current={currentSession()}
63+
placeholder="Select session"
6264
label={(x) => x.title}
6365
value={(x) => x.id}
6466
onSelect={navigateToSession}

0 commit comments

Comments
 (0)