Skip to content

Commit 7fd6d83

Browse files
committed
more clean up
1 parent 1875ab7 commit 7fd6d83

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

packages/react/src/modules/guide/components/Toolbar/V2/useInspectGuideClientStore.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,6 @@ import {
55
} from "@knocklabs/client";
66
import { useGuideContext, useStore } from "@knocklabs/react-core";
77

8-
const resolveIsEligible = ({
9-
active,
10-
targetable,
11-
archived,
12-
}: AnnotatedStatuses) => {
13-
if (!active.status) return false;
14-
if (!targetable.status) return false;
15-
if (archived.status) return false;
16-
return true;
17-
};
18-
198
// Active: `true` status = good
209
type ActiveStatus = {
2110
status: boolean;
@@ -44,7 +33,7 @@ type AnnotatedStatuses = {
4433
archived: ArchivedStatus;
4534
};
4635

47-
export type GuideAnnotation = AnnotatedStatuses & {
36+
type GuideAnnotation = AnnotatedStatuses & {
4837
// Resolved eligibility based on active, targetable and archived statuses,
4938
// which are backend driven evaluation results that are exposed for debugging.
5039
isEligible: boolean;
@@ -99,6 +88,17 @@ const toArchivedStatus = (
9988
};
10089
};
10190

91+
const resolveIsEligible = ({
92+
active,
93+
targetable,
94+
archived,
95+
}: AnnotatedStatuses) => {
96+
if (!active.status) return false;
97+
if (!targetable.status) return false;
98+
if (archived.status) return false;
99+
return true;
100+
};
101+
102102
type StoreStateSnapshot = Pick<
103103
KnockGuideClientStoreState,
104104
"guides" | "guideGroups" | "ineligibleGuides" | "debug"

0 commit comments

Comments
 (0)