@@ -4,7 +4,7 @@ import { graphql } from "relay-runtime";
4
4
5
5
import RecacheStoryAction from "coral-admin/components/StoryInfoDrawer/RecacheStoryAction" ;
6
6
import { withFragmentContainer } from "coral-framework/lib/relay" ;
7
- import { GQLSTORY_STATUS } from "coral-framework/schema" ;
7
+ import { GQLFEATURE_FLAG , GQLSTORY_STATUS } from "coral-framework/schema" ;
8
8
import { Flex , HorizontalGutter , TextLink } from "coral-ui/components/v2" ;
9
9
import ArchivedMarker from "coral-ui/components/v3/ArchivedMarker/ArchivedMarker" ;
10
10
@@ -32,6 +32,9 @@ const StoryInfoDrawerContainer: FunctionComponent<Props> = ({
32
32
viewer,
33
33
settings,
34
34
} ) => {
35
+ const dataCacheEnabled = settings . featureFlags . includes (
36
+ GQLFEATURE_FLAG . DATA_CACHE
37
+ ) ;
35
38
return (
36
39
< HorizontalGutter spacing = { 4 } className = { styles . root } >
37
40
< Flex justifyContent = "flex-start" >
@@ -84,13 +87,17 @@ const StoryInfoDrawerContainer: FunctionComponent<Props> = ({
84
87
< div className = { styles . storyDrawerAction } >
85
88
< RescrapeStory storyID = { story . id } />
86
89
</ div >
87
- < div className = { styles . storyDrawerAction } >
88
- < RecacheStoryAction storyID = { story . id } />
89
- </ div >
90
- { story . cached && (
91
- < div className = { styles . storyDrawerAction } >
92
- < InvalidateCachedStoryAction storyID = { story . id } />
93
- </ div >
90
+ { dataCacheEnabled && (
91
+ < >
92
+ < div className = { styles . storyDrawerAction } >
93
+ < RecacheStoryAction storyID = { story . id } />
94
+ </ div >
95
+ { story . cached && (
96
+ < div className = { styles . storyDrawerAction } >
97
+ < InvalidateCachedStoryAction storyID = { story . id } />
98
+ </ div >
99
+ ) }
100
+ </ >
94
101
) }
95
102
{ viewer && (
96
103
< div className = { styles . flexSizeToContentWidth } >
@@ -139,6 +146,7 @@ const enhanced = withFragmentContainer<Props>({
139
146
` ,
140
147
settings : graphql `
141
148
fragment StoryInfoDrawerContainer_settings on Settings {
149
+ featureFlags
142
150
...ModerateStoryButton_settings
143
151
}
144
152
` ,
0 commit comments