Skip to content

Commit a6dbced

Browse files
feat: Move ParticipantsDisplay inside EventDisplay
Restructure metadata layout by making EventDisplay accept children and placing ParticipantsDisplay inside it when event data exists. This groups related event information together for better visual organization while maintaining separate display when no event exists.
1 parent 8ad9250 commit a6dbced

File tree

1 file changed

+10
-2
lines changed
  • apps/desktop/src/components/main/body/sessions/outer-header/metadata

1 file changed

+10
-2
lines changed

apps/desktop/src/components/main/body/sessions/outer-header/metadata/index.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,20 @@ function ContentInner({ sessionId }: { sessionId: string }) {
9898

9999
return (
100100
<div className="flex flex-col gap-4 p-4 overflow-y-auto">
101-
{eventDisplayData && <EventDisplay event={eventDisplayData} />}
102101
{!eventDisplayData && <DateDisplay sessionId={sessionId} />}
103-
<ParticipantsDisplay sessionId={sessionId} />
102+
{eventDisplayData && (
103+
<EventDisplay event={eventDisplayData}>
104+
<ParticipantsDisplay sessionId={sessionId} />
105+
</EventDisplay>
106+
)}
107+
{!eventDisplayData && <ParticipantsDisplay sessionId={sessionId} />}
104108
</div>
105109
);
106110
}
107111

108112
export function EventDisplay({
109113
event,
114+
children,
110115
}: {
111116
event: {
112117
title: string | undefined;
@@ -117,6 +122,7 @@ export function EventDisplay({
117122
description: string | undefined;
118123
calendarId: string | undefined;
119124
};
125+
children?: React.ReactNode;
120126
}) {
121127
const tz = useConfigValue("timezone") || undefined;
122128

@@ -223,6 +229,8 @@ export function EventDisplay({
223229
<div className="text-sm text-neutral-700">{formatEventDateTime()}</div>
224230
)}
225231

232+
{children}
233+
226234
{event.description && (
227235
<>
228236
<div className="h-px bg-neutral-200" />

0 commit comments

Comments
 (0)