Skip to content

Commit a4a92df

Browse files
chore: remove commented-out code in useBinding hook (#21)
Removed obsolete commented-out logic in the `useBinding` hook within `src/utils/hooks.ts` to improve code maintainability and readability. - Removed unused `usePackages` and `useVersions` hook calls. - Removed logic for filtering `fullBindings` and `expBindings`. - Cleaned up the `useBinding` hook. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: sunnylqm <615282+sunnylqm@users.noreply.github.com>
1 parent bb8647e commit a4a92df

1 file changed

Lines changed: 0 additions & 15 deletions

File tree

src/utils/hooks.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -178,22 +178,7 @@ export const useBinding = (appId: number) => {
178178
queryKey: ['bindings', appId],
179179
queryFn: () => api.getBinding(appId),
180180
});
181-
// const {packages} = usePackages(appId);
182-
// const {versions} = useVersions({appId});
183181
const bindings = data?.data ?? [];
184-
// let fullBindings: Binding[] = [];
185-
// let expBindings: Binding[] = [];
186-
// bindings.forEach((binding) => {
187-
// if (
188-
// binding.rollout === 100 ||
189-
// binding.rollout === undefined ||
190-
// binding.rollout === null
191-
// ) {
192-
// fullBindings.push(binding);
193-
// } else {
194-
// expBindings.push(binding);
195-
// }
196-
// });
197182
return { bindings, isLoading };
198183
};
199184

0 commit comments

Comments
 (0)