11import { X } from "@phosphor-icons/react" ;
22import { useHostTRPC } from "@posthog/host-router/react" ;
3- import { MarkdownRenderer } from "@posthog/ui/features/editor/components/MarkdownRenderer" ;
43import { ReleaseNotesSections } from "@posthog/ui/features/updates/ReleaseNotesSections" ;
54import { parseReleaseNotes } from "@posthog/ui/features/updates/releaseNotes" ;
65import { useUpdateModalStore } from "@posthog/ui/features/updates/updateModalStore" ;
@@ -63,7 +62,7 @@ export function UpdateAvailableModal() {
6362 const downloadMutation = useMutation (
6463 hostTRPC . updates . download . mutationOptions ( ) ,
6564 ) ;
66- const { data : releasesData , isLoading : isLoadingReleases } = useQuery ( {
65+ const { data : releasesData , isPending : isPendingReleases } = useQuery ( {
6766 ...hostTRPC . githubReleases . list . queryOptions ( ) ,
6867 enabled : isOpen ,
6968 } ) ;
@@ -115,7 +114,7 @@ export function UpdateAvailableModal() {
115114 </ Dialog . Close >
116115 </ Flex >
117116
118- { hasParsedNotes || rawNotes || isLoadingReleases ? (
117+ { hasParsedNotes || isPendingReleases ? (
119118 < Flex direction = "column" gap = "2" >
120119 < Text
121120 size = "1"
@@ -125,18 +124,14 @@ export function UpdateAvailableModal() {
125124 >
126125 Release notes
127126 </ Text >
128- { hasParsedNotes || rawNotes ? (
127+ { hasParsedNotes && parsedNotes ? (
129128 < ScrollArea
130129 type = "auto"
131130 scrollbars = "vertical"
132131 style = { { maxHeight : 240 } }
133132 >
134133 < div className = "pr-3" >
135- { hasParsedNotes && parsedNotes ? (
136- < ReleaseNotesSections notes = { parsedNotes } />
137- ) : rawNotes ? (
138- < MarkdownRenderer content = { rawNotes } />
139- ) : null }
134+ < ReleaseNotesSections notes = { parsedNotes } />
140135 </ div >
141136 </ ScrollArea >
142137 ) : (
0 commit comments