File tree Expand file tree Collapse file tree 2 files changed +21
-13
lines changed Expand file tree Collapse file tree 2 files changed +21
-13
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ export type Flag =
1919 * Flag to add a beta warning. Enabled for review and staging site stages.
2020 */
2121 | "preReleaseNotice"
22+ /**
23+ * Flag to show the home page projects section which lacks content.
24+ */
25+ | "homePageProjects"
2226 /**
2327 * Example flags used for testing.
2428 */
@@ -33,6 +37,7 @@ interface FlagMetadata {
3337const allFlags : FlagMetadata [ ] = [
3438 // Alphabetical order.
3539 { name : "devtools" , defaultOnStages : [ "local" ] } ,
40+ { name : "homePageProjects" , defaultOnStages : [ "local" ] } ,
3641 { name : "preReleaseNotice" , defaultOnStages : [ "review" , "staging" ] } ,
3742 { name : "exampleOptInA" , defaultOnStages : [ "review" , "staging" ] } ,
3843 { name : "exampleOptInB" , defaultOnStages : [ ] } ,
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import blockImage from "../images/block.png";
2525import xyzGraph from "../images/xyz-graph.png" ;
2626import clap from "../images/clap-square.png" ;
2727import { createNewPageUrl } from "../urls" ;
28+ import { flags } from "../flags" ;
2829
2930const graphData = {
3031 x : [
@@ -197,19 +198,21 @@ const HomePage = () => {
197198 />
198199 </ VStack >
199200 </ VStack >
200- < VStack gap = { 8 } >
201- < Heading as = "h2" textAlign = "center" >
202- < FormattedMessage id = "homepage-projects" />
203- </ Heading >
204- < HStack gap = { 5 } flexDir = { { base : "column" , lg : "row" } } >
205- < ResourceCard
206- title = "Simple AI activity timer"
207- url = "https://www.example.com"
208- imgSrc = "https://cdn.sanity.io/images/ajwvhvgo/production/1aaac1553237900c774216aad17475ef34f8fe48-800x600.jpg?fit=max& w = 1200 & h = 1200 "
209- />
210- < ResourceCardPlaceholder />
211- </ HStack >
212- </ VStack >
201+ { flags . homePageProjects && (
202+ < VStack gap = { 8 } >
203+ < Heading as = "h2" textAlign = "center" >
204+ < FormattedMessage id = "homepage-projects" />
205+ </ Heading >
206+ < HStack gap = { 5 } flexDir = { { base : "column" , lg : "row" } } >
207+ < ResourceCard
208+ title = "Simple AI activity timer"
209+ url = "https://www.example.com"
210+ imgSrc = "https://cdn.sanity.io/images/ajwvhvgo/production/1aaac1553237900c774216aad17475ef34f8fe48-800x600.jpg?fit=max& w = 1200 & h = 1200 "
211+ />
212+ < ResourceCardPlaceholder />
213+ </ HStack >
214+ </ VStack >
215+ ) }
213216 </ Container >
214217 </ DefaultPageLayout >
215218 ) ;
You can’t perform that action at this time.
0 commit comments