complete project using prettier!
This commit is contained in:
@@ -13,7 +13,7 @@ export const useFlyerItems = (selectedFlyer: Flyer | null) => {
|
||||
// This should not be called with undefined due to the `enabled` flag,
|
||||
// but this wrapper satisfies the type checker.
|
||||
if (flyerId === undefined) {
|
||||
return Promise.reject(new Error("Cannot fetch items for an undefined flyer ID."));
|
||||
return Promise.reject(new Error('Cannot fetch items for an undefined flyer ID.'));
|
||||
}
|
||||
return apiClient.fetchFlyerItems(flyerId);
|
||||
};
|
||||
@@ -22,7 +22,7 @@ export const useFlyerItems = (selectedFlyer: Flyer | null) => {
|
||||
wrappedFetcher,
|
||||
[selectedFlyer],
|
||||
{ enabled: !!selectedFlyer },
|
||||
selectedFlyer?.flyer_id
|
||||
selectedFlyer?.flyer_id,
|
||||
);
|
||||
return { flyerItems: data?.items || [], isLoading: loading, error };
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user