Skip to content

Commit

Permalink
set summary to an empty string while loading
Browse files Browse the repository at this point in the history
  • Loading branch information
nickoferrall committed Jan 10, 2025
1 parent c814666 commit f9ee053
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const WholeMeetingSummary = (props: Props) => {
const reflections = reflectionGroups?.flatMap((group) => group.reflections) // reflectionCount hasn't been calculated yet so check reflections length
const hasMoreThanOneReflection = reflections?.length && reflections.length > 1
if (!hasMoreThanOneReflection || !organization.useAI || !hasAiApiKey) return null
if (wholeMeetingSummary === undefined) return <WholeMeetingSummaryLoading /> // summary is undefined if it hasn't been generated yet. it's null if unsuccessful
if (wholeMeetingSummary === '') return <WholeMeetingSummaryLoading /> // summary is undefined if it hasn't been generated yet. it's null if unsuccessful
return <WholeMeetingSummaryResult meetingRef={meeting} />
} else if (meeting.__typename === 'TeamPromptMeeting') {
const {summary: wholeMeetingSummary, responses, organization} = meeting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ const safeEndRetrospective = async ({
endedAt: sql`CURRENT_TIMESTAMP`,
phases: JSON.stringify(phases),
usedReactjis: JSON.stringify(insights.usedReactjis),
engagement: insights.engagement
engagement: insights.engagement,
summary: '' // empty string signals "loading" to the client
})
.where('id', '=', meetingId)
.executeTakeFirst()
Expand Down

0 comments on commit f9ee053

Please sign in to comment.