Skip to content

Commit

Permalink
Updated feature gates (#3266)
Browse files Browse the repository at this point in the history
  • Loading branch information
hkirat authored Mar 9, 2023
1 parent 4995001 commit d3e8457
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions backend/workers/feature-gates/src/FEATURES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const FEATURE_GATES = {
SWAP_FEES_ENABLED: false,
DROPZONE_ENABLED: false,
STICKER_ENABLED: false,
BARTER_ENABLED: false,
} satisfies {
// ensure all keys are present
[feature in keyof FEATURE_GATES_MAP]: boolean;
Expand Down
2 changes: 1 addition & 1 deletion packages/chat-sdk/src/components/SendMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ export const SendMessage = ({
setAboveMessagePlugin={setAboveMessagePlugin}
/>
) : null}
{type === "individual" && BARTER_ENABLED ? (
{type === "individual" && featureGates["BARTER_ENABLED"] ? (
<Barter
setOpenPlugin={setOpenPlugin}
onMediaSelect={onMediaSelect}
Expand Down
1 change: 1 addition & 0 deletions packages/common/src/feature-gates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const DEFAULT_FEATURE_GATES = {
SWAP_FEES_ENABLED: false,
DROPZONE_ENABLED: false,
STICKER_ENABLED: false,
BARTER_ENABLED: false,
} as const;

export type FEATURE_GATES_MAP = typeof DEFAULT_FEATURE_GATES;
Expand Down

1 comment on commit d3e8457

@vercel
Copy link

@vercel vercel bot commented on d3e8457 Mar 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.