feat: implement session creation flow
Refactor `CreateSessionDialog` to be controlled by its parent instead of using an internal `open` prop. Lift the state up to `JournalPanel` and pass the creation callback through `JournalHeader` to `SessionDropdown`.
This commit is contained in:
@@ -7,6 +7,7 @@ import { SessionDropdown } from "./SessionDropdown";
|
||||
|
||||
interface JournalHeaderProps {
|
||||
onClose: () => void;
|
||||
onCreateSession: () => void;
|
||||
}
|
||||
|
||||
export const JournalHeader: Component<JournalHeaderProps> = (props) => {
|
||||
@@ -51,7 +52,7 @@ export const JournalHeader: Component<JournalHeaderProps> = (props) => {
|
||||
</p>
|
||||
{/* Clickable subtitle — session dropdown (GM only) */}
|
||||
<Show when={stream.myRole === "gm"}>
|
||||
<SessionDropdown />
|
||||
<SessionDropdown onCreate={props.onCreateSession} />
|
||||
</Show>
|
||||
</div>
|
||||
</Show>
|
||||
|
||||
Reference in New Issue
Block a user