MCPcopy Create free account
hub / github.com/dailydotdev/apps / usePostRedesign

Function usePostRedesign

packages/shared/src/hooks/post/usePostRedesign.ts:32–40  ·  view source on GitHub ↗
(post?: Post)

Source from the content-addressed store, hash-verified

30 * layout, so the post page and the post modal stay in sync.
31 */
32export const usePostRedesign = (post?: Post): UsePostRedesign => {
33 const isEligible = isPostRedesignEligible(post);
34 const { value: isFlagOn } = useConditionalFeature({
35 feature: featurePostRedesign,
36 shouldEvaluate: isEligible,
37 });
38
39 return { isEligible, showRedesign: isEligible && isFlagOn };
40};

Callers 3

CollectionPostModalFunction · 0.90
PostModalFunction · 0.90
ArticlePostModalFunction · 0.90

Calls 2

useConditionalFeatureFunction · 0.90
isPostRedesignEligibleFunction · 0.85

Tested by

no test coverage detected