From c45df268b196a9e2b7332253eb8f1b48e879a450 Mon Sep 17 00:00:00 2001 From: "ildar.timerbaev" Date: Mon, 25 Nov 2024 23:37:52 +0300 Subject: [PATCH] Attempted to fix server error --- package.json | 2 +- sentry.client.config.ts | 3 +++ sentry.edge.config.ts | 3 +++ sentry.server.config.ts | 2 ++ .../[username]/_components/preferences/index.tsx | 1 - src/config/index.tsx | 2 +- src/features/shared/entry-list-content/index.tsx | 16 ++++++---------- 7 files changed, 16 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index f131ae7d7..491da4bf2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ecency-vision-next", - "version": "4.0.1", + "version": "4.0.2", "private": true, "scripts": { "dev": "next dev", diff --git a/sentry.client.config.ts b/sentry.client.config.ts index 688ccef1f..4bc493010 100644 --- a/sentry.client.config.ts +++ b/sentry.client.config.ts @@ -3,6 +3,7 @@ // https://docs.sentry.io/platforms/javascript/guides/nextjs/ import * as Sentry from "@sentry/nextjs"; +import appPackage from "./package.json"; Sentry.init({ dsn: "https://8a5c1659d1c2ba3385be28dc7235ce56@o4507985141956608.ingest.de.sentry.io/4507985146609744", @@ -10,6 +11,8 @@ Sentry.init({ // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control. tracesSampleRate: 1, + release: appPackage.version, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false }); diff --git a/sentry.edge.config.ts b/sentry.edge.config.ts index d986b87b4..e4b7f3395 100644 --- a/sentry.edge.config.ts +++ b/sentry.edge.config.ts @@ -4,6 +4,7 @@ // https://docs.sentry.io/platforms/javascript/guides/nextjs/ import * as Sentry from "@sentry/nextjs"; +import appPackage from "./package.json"; Sentry.init({ dsn: "https://8a5c1659d1c2ba3385be28dc7235ce56@o4507985141956608.ingest.de.sentry.io/4507985146609744", @@ -11,6 +12,8 @@ Sentry.init({ // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control. tracesSampleRate: 1, + release: appPackage.version, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false }); diff --git a/sentry.server.config.ts b/sentry.server.config.ts index 90a1d1244..607eaaf2c 100644 --- a/sentry.server.config.ts +++ b/sentry.server.config.ts @@ -4,6 +4,7 @@ import * as Sentry from "@sentry/nextjs"; import { nodeProfilingIntegration } from "@sentry/profiling-node"; +import appPackage from "./package.json"; Sentry.init({ dsn: "https://8a5c1659d1c2ba3385be28dc7235ce56@o4507985141956608.ingest.de.sentry.io/4507985146609744", @@ -13,5 +14,6 @@ Sentry.init({ // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, + release: appPackage.version, integrations: [nodeProfilingIntegration()] }); diff --git a/src/app/(dynamicPages)/profile/[username]/_components/preferences/index.tsx b/src/app/(dynamicPages)/profile/[username]/_components/preferences/index.tsx index 10b393298..211a8edea 100644 --- a/src/app/(dynamicPages)/profile/[username]/_components/preferences/index.tsx +++ b/src/app/(dynamicPages)/profile/[username]/_components/preferences/index.tsx @@ -66,7 +66,6 @@ export function Preferences() { [setCurrency] ); - // @ts-ignore return ( <>
diff --git a/src/config/index.tsx b/src/config/index.tsx index a66a5193a..544ae8e9c 100644 --- a/src/config/index.tsx +++ b/src/config/index.tsx @@ -70,7 +70,7 @@ export namespace EcencyConfigManager { export const Conditional = memo((props) => { if (props.condition(CONFIG)) { - return props.children; + return props.children ?? <>; } return props.fallback ?? <>; diff --git a/src/features/shared/entry-list-content/index.tsx b/src/features/shared/entry-list-content/index.tsx index 397d37160..148072158 100644 --- a/src/features/shared/entry-list-content/index.tsx +++ b/src/features/shared/entry-list-content/index.tsx @@ -35,9 +35,8 @@ export function EntryListContent({ return ( <> - {dataToRender.length > 0 ? ( - <> - {dataToRender.map((e, i) => { + {dataToRender.length > 0 + ? dataToRender.map((e, i) => { const l = []; if (i % 4 === 0 && i > 0) { @@ -82,13 +81,10 @@ export function EntryListContent({ ); } return [...l]; - })} - - ) : ( - showEmptyPlaceholder && ( - - ) - )} + }) + : showEmptyPlaceholder && ( + + )} ); }