File tree Expand file tree Collapse file tree 6 files changed +16
-13
lines changed Expand file tree Collapse file tree 6 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -58,13 +58,13 @@ const DeploymentDetailsDialogContent = ({
58
58
} ) => {
59
59
const [ isEditing , setIsEditing ] = useState ( false )
60
60
const { updateDeployment, isLoading, error } = useUpdateDeployment (
61
- deployment ? .id
61
+ deployment . id
62
62
)
63
63
64
64
useEffect ( ( ) => {
65
65
// Reset to view mode when a new deployment is selected
66
66
setIsEditing ( false )
67
- } , [ deployment ? .id ] )
67
+ } , [ deployment . id ] )
68
68
69
69
return (
70
70
< >
Original file line number Diff line number Diff line change @@ -42,13 +42,13 @@ export const Deployments = () => {
42
42
</ PageHeader >
43
43
< Table
44
44
items = { sortedItems }
45
- isLoading = { isLoading }
45
+ isLoading = { ! id && isLoading }
46
46
columns = { columns ( projectId as string ) }
47
47
sortable
48
48
sortSettings = { sort }
49
49
onSortSettingsChange = { setSort }
50
50
/>
51
- { ! isLoading && id ? < DeploymentDetailsDialog id = { id } /> : null }
51
+ { id ? < DeploymentDetailsDialog id = { id } /> : null }
52
52
</ >
53
53
)
54
54
}
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ export const Jobs = () => {
50
50
</ PageHeader >
51
51
< Table
52
52
items = { jobs }
53
- isLoading = { isLoading }
53
+ isLoading = { ! id && isLoading }
54
54
columns = { columns ( projectId as string ) }
55
55
sortable
56
56
sortSettings = { sort }
@@ -65,7 +65,7 @@ export const Jobs = () => {
65
65
/>
66
66
) : null }
67
67
</ PageFooter >
68
- { ! isLoading && id ? < JobDetailsDialog id = { id } /> : null }
68
+ { id ? < JobDetailsDialog id = { id } /> : null }
69
69
</ >
70
70
)
71
71
}
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ export const Occurrences = () => {
100
100
{ selectedView === 'table' && (
101
101
< Table
102
102
items = { occurrences }
103
- isLoading = { isLoading }
103
+ isLoading = { ! id && isLoading }
104
104
columns = { columns (
105
105
projectId as string ,
106
106
selectedItems . length === 0
@@ -115,7 +115,10 @@ export const Occurrences = () => {
115
115
) }
116
116
{ selectedView === 'gallery' && (
117
117
< div className = { styles . galleryContent } >
118
- < OccurrenceGallery occurrences = { occurrences } isLoading = { isLoading } />
118
+ < OccurrenceGallery
119
+ occurrences = { occurrences }
120
+ isLoading = { ! id && isLoading }
121
+ />
119
122
</ div >
120
123
) }
121
124
< PageFooter >
@@ -141,7 +144,7 @@ export const Occurrences = () => {
141
144
/>
142
145
) : null }
143
146
</ PageFooter >
144
- { ! isLoading && id ? < OccurrenceDetailsDialog id = { id } /> : null }
147
+ { id ? < OccurrenceDetailsDialog id = { id } /> : null }
145
148
</ >
146
149
)
147
150
}
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export const SpeciesDetails = ({ species }: { species: Species }) => {
21
21
const blueprintItems = useMemo (
22
22
( ) =>
23
23
species . occurrences . length
24
- ? species ? .occurrences
24
+ ? species . occurrences
25
25
. map ( ( id ) => species . getOccurrenceInfo ( id ) )
26
26
. filter ( ( item ) : item is BlueprintItem => ! ! item )
27
27
. map ( ( item ) => ( {
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ export const Species = () => {
71
71
{ selectedView === 'table' && (
72
72
< Table
73
73
items = { species }
74
- isLoading = { isLoading }
74
+ isLoading = { ! id && isLoading }
75
75
columns = { columns ( projectId as string ) }
76
76
sortable
77
77
sortSettings = { sort }
@@ -80,7 +80,7 @@ export const Species = () => {
80
80
) }
81
81
{ selectedView === 'gallery' && (
82
82
< div className = { styles . galleryContent } >
83
- < SpeciesGallery species = { species } isLoading = { isLoading } />
83
+ < SpeciesGallery species = { species } isLoading = { ! id && isLoading } />
84
84
</ div >
85
85
) }
86
86
< PageFooter >
@@ -92,7 +92,7 @@ export const Species = () => {
92
92
/>
93
93
) : null }
94
94
</ PageFooter >
95
- { ! isLoading && id ? < SpeciesDetailsDialog id = { id } /> : null }
95
+ { id ? < SpeciesDetailsDialog id = { id } /> : null }
96
96
</ >
97
97
)
98
98
}
You can’t perform that action at this time.
0 commit comments