Skip to content

Commit

Permalink
Merge pull request #1852 from zeitgeistpm/tr-coindesk-2
Browse files Browse the repository at this point in the history
Configurable market tags
  • Loading branch information
Robiquet authored Oct 4, 2023
2 parents 257bc70 + 6b7e4fa commit d22dcc5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ NEXT_PUBLIC_SITE_URL=http://localhost:3000

# disable grillchat
NEXT_PUBLIC_GRILLCHAT_DISABLE=true

NEXT_PUBLIC_OTHER_TAGS=["Coindesk"]

10 changes: 4 additions & 6 deletions lib/constants/markets.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { EMarketStatus, MarketStatus } from "lib/types/markets";
import { environment } from ".";

const prodTags = [
"Politics",
Expand All @@ -13,12 +12,11 @@ const prodTags = [
"E-Sports",
] as const;

const otherTags = ["Coindesk"] as const;
const otherTags = process.env.NEXT_PUBLIC_OTHER_TAGS
? JSON.parse(process.env.NEXT_PUBLIC_OTHER_TAGS)
: [];

export const defaultTags = [
...prodTags,
...(environment !== "production" ? otherTags : []),
] as const;
export const defaultTags = [...prodTags, ...otherTags] as const;

export type SupportedTag = typeof defaultTags[number];

Expand Down
2 changes: 1 addition & 1 deletion lib/types/market-filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type MarketOrderByOption = {
value: MarketsOrderBy;
};

export type MarketFilterTagLabel = typeof CATEGORIES[number]["name"];
export type MarketFilterTagLabel = typeof CATEGORIES[number]["name"] | string;

export type MarketFilterStatusLabel = MarketStatus;

Expand Down

0 comments on commit d22dcc5

Please sign in to comment.