Skip to content

Commit 93133fe

Browse files
committed
Refactor VsumTabs component to remove loading state management
- Eliminated loadingId state and its associated logic to simplify the component's functionality. - Streamlined error handling by removing unnecessary finalization steps.
1 parent a900b8e commit 93133fe

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/components/ui/VsumTabs.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,13 @@ export const VsumTabs: React.FC<VsumTabsProps> = ({ openVsums, activeVsumId, onA
4343

4444
useEffect(() => {
4545
const fetchDetails = async (id: number) => {
46-
setLoadingId(id);
4746
setError('');
4847
try {
4948
const res = await apiService.getVsumDetails(id);
5049
setDetailsById(prev => ({ ...prev, [id]: res.data }));
5150
setEdits(prev => ({ ...prev, [id]: { name: res.data.name, metaModelIds: (res.data.metaModels || []).map(m => m.id) } }));
5251
} catch (e) {
5352
setError(e instanceof Error ? e.message : 'Failed to load vSUM details');
54-
} finally {
55-
setLoadingId(null);
5653
}
5754
};
5855
if (activeVsumId && !detailsById[activeVsumId]) {

0 commit comments

Comments
 (0)