refactor: small code improvements

refactor: remove unused code

refactor: extract loader component

refactor: prevent keyword collision

refactor: cleanup hook pending states
This commit is contained in:
Carlos Valente
2025-07-23 21:13:14 +02:00
committed by Carlos Valente
parent 8c90f5043f
commit e204f671be
10 changed files with 30 additions and 25 deletions
@@ -7,7 +7,7 @@ import { VIEW_SETTINGS } from '../api/constants';
import { viewsSettingsPlaceholder } from '../models/ViewSettings.type';
export default function useViewSettings() {
const { data, isPending } = useQuery({
const { data, status } = useQuery({
queryKey: VIEW_SETTINGS,
queryFn: getViewSettings,
placeholderData: (previousData, _previousQuery) => previousData,
@@ -24,5 +24,5 @@ export default function useViewSettings() {
},
});
return { data: data ?? viewsSettingsPlaceholder, mutateAsync, isPending };
return { data: data ?? viewsSettingsPlaceholder, status, mutateAsync };
}