Skip to content

Commit

Permalink
Merge pull request #2 from ecency/feature/config-1.1
Browse files Browse the repository at this point in the history
Improved configuration file
  • Loading branch information
feruzm authored Sep 6, 2024
2 parents e43ed0a + 8173841 commit bcdb4f4
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 115 deletions.
35 changes: 20 additions & 15 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/config/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
config.json
config.ts
97 changes: 0 additions & 97 deletions src/config/config.template.json

This file was deleted.

99 changes: 99 additions & 0 deletions src/config/config.template.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
const CONFIG = {
visionConfig: {
privateMode: true,
features: {
communities: {
rewards: {
enabled: true
}
},
hiveWallet: {
receivedList: {
enabled: true
}
},

polls: {
creating: {
enabled: true
}
}
},
thirdPartyFeatures: {
threeSpeak: {
uploading: {
enabled: true
}
}
},
visionFeatures: {
perks: {
enabled: true
},
userActivityTracking: {
enabled: true
},
points: {
enabled: true
},
decks: {
enabled: true
},
notifications: {
enabled: true,
push: {
enabled: true
}
},
imageServer: {
enabled: true
},
favourites: {
enabled: true
},
bookmarks: {
enabled: true
},
entries: {
rawContent: {
enabled: true
}
},
referrals: {
enabled: true
},
gallery: {
enabled: true
},
drafts: {
enabled: true
},
schedules: {
enabled: true
},
fragments: {
enabled: true
},
discover: {
leaderboard: {
enabled: true
},
curation: {
enabled: true
}
},
promotions: {
enabled: true
},
editHistory: {
enabled: true
}
},
service: {
hsClientId: process.env.NEXT_PUBLUC_HS_CLIENT_ID || "ecency.app",
hsClientSecret: process.env.NEXT_PUBLIC_HS_CLIENT_SECRET || ""
}
}
};

export default CONFIG;
2 changes: 1 addition & 1 deletion src/config/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config from "./config.json";
import config from "./config";
import { ComponentType, memo, PropsWithChildren, ReactNode } from "react";
import { QueryClient, useMutation, UseMutationOptions } from "@tanstack/react-query";
import type { DefaultError } from "@tanstack/query-core";
Expand Down
2 changes: 1 addition & 1 deletion src/core/global-store/modules/config-module.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config from "../../../config/config.json";
import config from "../../../config/config";

export function createConfigState() {
if (!config.visionConfig) {
Expand Down

0 comments on commit bcdb4f4

Please sign in to comment.