File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 11import { faSparkle , Icon } from "@rivet-gg/icons" ;
2- import { useSuspenseQuery } from "@tanstack/react-query" ;
2+ import { useQuery } from "@tanstack/react-query" ;
33import { useLocalStorage } from "usehooks-ts" ;
44import {
55 Avatar ,
@@ -113,13 +113,27 @@ interface ChangelogProps {
113113}
114114
115115export function Changelog ( { className, children, ...props } : ChangelogProps ) {
116- const { data } = useSuspenseQuery ( changelogQueryOptions ( ) ) ;
116+ const { data, isLoading , isError } = useQuery ( changelogQueryOptions ( ) ) ;
117117
118118 const [ lastChangelog , setLast ] = useLocalStorage < string | null > (
119119 "rivet-lastchangelog" ,
120120 null ,
121121 ) ;
122122
123+ if ( isLoading || isError || ! data || data . length === 0 ) {
124+ return (
125+ < Slot
126+ { ...props }
127+ className = { cn (
128+ "relative [&_[data-changelog-ping]]:hidden" ,
129+ className ,
130+ ) }
131+ >
132+ { children }
133+ </ Slot >
134+ ) ;
135+ }
136+
123137 const hasNewChangelog = ! lastChangelog
124138 ? data . length > 0
125139 : data . some (
You can’t perform that action at this time.
0 commit comments