@@ -7,6 +7,7 @@ import { useNoiseThresholds } from 'lib/seam/noise-sensors/use-noise-thresholds.
77import { DetailRow } from 'lib/ui/layout/DetailRow.js'
88import { DetailSection } from 'lib/ui/layout/DetailSection.js'
99import { DetailSectionGroup } from 'lib/ui/layout/DetailSectionGroup.js'
10+ import { LoadingToast } from 'lib/ui/LoadingToast/LoadingToast.js'
1011
1112interface NoiseThresholdsListProps {
1213 device : NoiseSensorDevice
@@ -21,6 +22,14 @@ export function NoiseThresholdsList({
2122
2223 return (
2324 < DetailSectionGroup >
25+ < div className = 'seam-loading-toast-centered-wrap' >
26+ < LoadingToast
27+ isLoading = { isInitialLoading }
28+ label = { t . loading }
29+ top = '56px'
30+ />
31+ </ div >
32+
2433 < div className = 'seam-detail-section-wrap' >
2534 < DetailSection
2635 label = { t . noiseThresholds }
@@ -39,10 +48,7 @@ export function NoiseThresholdsList({
3948 )
4049 }
4150 >
42- < Content
43- isInitialLoading = { isInitialLoading }
44- noiseThresholds = { noiseThresholds }
45- />
51+ < Content noiseThresholds = { noiseThresholds } />
4652 </ DetailSection >
4753
4854 < div className = 'seam-detail-section-footer' >
@@ -59,20 +65,10 @@ export function NoiseThresholdsList({
5965}
6066
6167function Content ( {
62- isInitialLoading,
6368 noiseThresholds,
6469} : {
65- isInitialLoading : boolean
6670 noiseThresholds : NoiseThresholds [ ] | undefined
6771} ) : JSX . Element | JSX . Element [ ] {
68- if ( isInitialLoading ) {
69- return (
70- < DetailRow
71- label = { < span className = 'seam-detail-row-empty-label' > { t . loading } </ span > }
72- />
73- )
74- }
75-
7672 if ( noiseThresholds == null || noiseThresholds . length === 0 ) {
7773 return (
7874 < DetailRow
0 commit comments