@@ -298,9 +298,8 @@ function npmQueryOptions({
298298 let actualStartDate = startDate
299299
300300 // Import the server function for fetching npm downloads
301- const { fetchNpmDownloadChunk } = await import (
302- '~/utils/stats.server'
303- )
301+ const { fetchNpmDownloadChunk } =
302+ await import ( '~/utils/stats.server' )
304303
305304 const packages = await Promise . all (
306305 packageGroup . packages . map ( async ( pkg ) => {
@@ -1262,7 +1261,7 @@ function RouteComponent() {
12621261 < div className = "min-h-dvh p-2 sm:p-4 space-y-2 sm:space-y-4" >
12631262 < div className = "flex gap-4" >
12641263 < div className = "flex-1 bg-white dark:bg-black/50 rounded-lg space-y-4 p-4 shadow-xl max-w-full" >
1265- < div className = "flex gap-2 flex-wrap" >
1264+ < div className = "flex gap-2 flex-wrap items-center " >
12661265 < PackageSearch onSelect = { handleAddPackage } />
12671266 < DropdownMenu >
12681267 < Tooltip content = "Select time range" >
@@ -1816,20 +1815,18 @@ function RouteComponent() {
18161815 { Object . keys ( packageGroups ) . length ? (
18171816 < div className = "" >
18181817 < div className = "space-y-2 sm:space-y-4" >
1819- < Resizable height = { height } onHeightChange = { onHeightChange } >
1820- { npmQuery . isLoading && ! npmQuery . data ? (
1821- < div
1822- className = "flex items-center justify-center"
1823- style = { { height } }
1824- >
1818+ < div className = "relative" >
1819+ { npmQuery . isFetching ? (
1820+ < div className = "absolute inset-0 flex items-center justify-center bg-white/30 dark:bg-black/30 backdrop-blur-sm z-10 rounded-lg" >
18251821 < div className = "flex flex-col items-center gap-4" >
18261822 < FaSpinner className = "w-8 h-8 animate-spin text-blue-500" />
1827- < div className = "text-sm text-gray-600 dark:text-gray-400 " >
1828- Loading download statistics ...
1823+ < div className = "text-sm font-medium text-gray-900 dark:text-gray-100 " >
1824+ Updating ...
18291825 </ div >
18301826 </ div >
18311827 </ div >
1832- ) : (
1828+ ) : null }
1829+ < Resizable height = { height } onHeightChange = { onHeightChange } >
18331830 < NpmStatsChart
18341831 range = { range }
18351832 queryData = { npmQuery . data }
@@ -1840,8 +1837,8 @@ function RouteComponent() {
18401837 facetY = { facetY }
18411838 showDataMode = { showDataModeParam }
18421839 />
1843- ) }
1844- </ Resizable >
1840+ </ Resizable >
1841+ </ div >
18451842 < div className = "overflow-x-auto rounded-xl" >
18461843 < table className = "min-w-full" >
18471844 < thead className = "bg-gray-500/10" >
0 commit comments