Skip to content

Commit 5ee1d57

Browse files
agatha197claude
andcommitted
refactor(FR-3224): drop redundant announcement fetch in MaintenanceSettingList
The edit modal now fetches the announcement itself, so the Maintenance page no longer needs to query get_announcement just to prefill the modal (removing an extra suspending request on page load). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent eef4859 commit 5ee1d57

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

react/src/components/MaintenanceSettingList.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
Copyright (c) 2015-2026 Lablup Inc. All rights reserved.
44
*/
55
import { useSuspendedBackendaiClient } from '../hooks';
6-
import { useSuspenseGetAnnouncement } from '../hooks/useAnnouncement';
76
import { useSetBAINotification } from '../hooks/useBAINotification';
87
import AnnouncementEditModal from './AnnouncementEditModal';
98
import SettingList, { SettingGroup } from './SettingList';
@@ -23,8 +22,6 @@ const MaintenanceSettingList = () => {
2322
const { upsertNotification } = useSetBAINotification();
2423
const baiClient = useSuspendedBackendaiClient();
2524

26-
const { data: announcement } = useSuspenseGetAnnouncement();
27-
2825
const recalculateUsage = () => {
2926
setIsRecalculating(true);
3027

@@ -165,8 +162,6 @@ const MaintenanceSettingList = () => {
165162
<BAIUnmountAfterClose>
166163
<AnnouncementEditModal
167164
open={isAnnouncementModalOpen}
168-
initialMessage={announcement?.message ?? ''}
169-
initialEnabled={announcement?.enabled ?? true}
170165
onRequestClose={() => setIsAnnouncementModalOpen(false)}
171166
/>
172167
</BAIUnmountAfterClose>

0 commit comments

Comments
 (0)