Skip to content

Commit

Permalink
fix key prop and env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
feruzm committed Sep 6, 2024
1 parent a084b2e commit 087d8e8
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
6 changes: 4 additions & 2 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/app/api/auth-api/hs-token-refresh/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { EcencyConfigManager } from "@/config";

export async function POST(req: Request) {
const hsSecret = EcencyConfigManager.CONFIG.service.hsClientSecret;
if (hsSecret && !EcencyConfigManager.CONFIG.privateMode) {
if (hsSecret && !Boolean(parseInt(EcencyConfigManager.CONFIG.privateMode, 10))) {
const body = await req.json();
if (!decodeToken(body.code)) {
Response.json({
Expand Down
4 changes: 2 additions & 2 deletions src/app/proposals/_components/proposal-votes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ export function ProposalVotes({ proposal, onHide }: ProposalVotesProps) {
<div className="voters-list mb-4">
<List grid={true} inline={true} defer={true}>
{(voters?.length ?? 0) > 0 ? (
voters?.map((x) => {
voters?.map((x,index) => {
const strHp = numeral(x.hp).format("0.00,");
const strProxyHp = numeral(x.proxyHp).format("0.00,");

return (
<ListItem styledDefer={true} className="!flex gap-3">
<ListItem styledDefer={true} key={index} className="!flex gap-3">
<ProfileLink username={x.name}>
<UserAvatar username={x.name} size="small" />
</ProfileLink>
Expand Down
2 changes: 1 addition & 1 deletion src/config/config.template.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const CONFIG = {
visionConfig: {
privateMode: process.env.USE_PRIVATE || true,
privateMode: process.env.USE_PRIVATE || "1",
features: {
communities: {
rewards: {
Expand Down
2 changes: 1 addition & 1 deletion src/features/shared/entry-menu/menu-items-generator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export function useMenuItemsGenerator(
})
),
EcencyConfigManager.withConditional(
({ privateMode }) => privateMode,
({ privateMode }) => Boolean(parseInt(privateMode, 10)),
() => ({
label: i18next.t("entry.address-copy"),
onClick: copyAddress,
Expand Down

0 comments on commit 087d8e8

Please sign in to comment.