mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-07-28 14:01:16 -07:00
Adding Simple URL-based feature flags (#117)
* Fixes #66: As a developer, I want to limit the audience that sees new features, so that we can control the message and positioning of our tool. Implements simple feature flagging via URL parameters. Provide "?flags=x,y,z" to enable flags x, y, and z. * Fixing type to use Location instead of URL * Updating README with info on how to use feature flags
This commit is contained in:
parent
c07a14a8db
commit
7ab14c7f3d
11 changed files with 202 additions and 31 deletions
|
@ -20,9 +20,12 @@ import pollutionIcon // @ts-ignore
|
|||
import washIcon from '/node_modules/uswds/dist/img/usa-icons/wash.svg';
|
||||
import J40Aside from '../components/J40Aside';
|
||||
|
||||
interface IndexPageProps {
|
||||
location: Location;
|
||||
};
|
||||
|
||||
// markup
|
||||
const IndexPage = () => {
|
||||
const IndexPage = ({location}: IndexPageProps) => {
|
||||
const readMoreList: (any | string)[][] = [
|
||||
[ecoIcon, 'Clean energy and energy efficiency'],
|
||||
[busIcon, 'Clean transit'],
|
||||
|
@ -33,7 +36,7 @@ const IndexPage = () => {
|
|||
];
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
<Layout location={location}>
|
||||
<main id="main-content" role="main">
|
||||
<div className={'grid-row grid-gap-2'}>
|
||||
<section className={'grid-container usa-section'}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue