Skip to content

Commit eef4859

Browse files
agatha197claude
andcommitted
refactor(FR-3224): use shared useSuspenseGetAnnouncement hook
Replace the inline get_announcement query in MaintenanceSettingList with the shared useSuspenseGetAnnouncement hook introduced on the parent branch, removing the duplicated query definition. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent b465395 commit eef4859

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

react/src/components/MaintenanceSettingList.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Copyright (c) 2015-2026 Lablup Inc. All rights reserved.
44
*/
55
import { useSuspendedBackendaiClient } from '../hooks';
6-
import { useSuspenseTanQuery } from '../hooks/reactQueryAlias';
6+
import { useSuspenseGetAnnouncement } from '../hooks/useAnnouncement';
77
import { useSetBAINotification } from '../hooks/useBAINotification';
88
import AnnouncementEditModal from './AnnouncementEditModal';
99
import SettingList, { SettingGroup } from './SettingList';
@@ -23,12 +23,7 @@ const MaintenanceSettingList = () => {
2323
const { upsertNotification } = useSetBAINotification();
2424
const baiClient = useSuspendedBackendaiClient();
2525

26-
const { data: announcement } = useSuspenseTanQuery({
27-
queryKey: ['baiClient', 'service', 'get_announcement'],
28-
queryFn: () => {
29-
return baiClient.service.get_announcement();
30-
},
31-
});
26+
const { data: announcement } = useSuspenseGetAnnouncement();
3227

3328
const recalculateUsage = () => {
3429
setIsRecalculating(true);

0 commit comments

Comments
 (0)