Fix loading of recommended methods

This commit is contained in:
adilallo
2026-05-26 09:03:18 -06:00
parent 2871df27b2
commit 8420ce42e3
11 changed files with 261 additions and 58 deletions
@@ -25,7 +25,9 @@ export function useMethodCardDeckOrdering(
methods: readonly MethodEntry[],
selectedIds: readonly string[],
) {
const { scoresBySlug, hasAnyFacets } = useFacetRecommendations(section);
const { scoresBySlug, hasAnyFacets, isReady } =
useFacetRecommendations(section);
const recommendationsReady = !hasAnyFacets || isReady;
const rankedMethods = useMemo(
() => rankMethodsByScore(methods, scoresBySlug),
@@ -90,5 +92,6 @@ export function useMethodCardDeckOrdering(
recommendedIds,
sampleCards,
methodById,
recommendationsReady,
};
}