Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

feat: instagram, only english labels

Nevo David66ac5495211a
diff --git a/.npmrc b/.npmrc
index c651c781b..2de02d595 100644
--- a/.npmrc
+++ b/.npmrc
@@ -2,4 +2,4 @@ ignore-workspace-root-check=true
node-linker=hoisted
restrict-manifest-changes=true
sync-injected-deps-after-scripts[]=build
-inject-workspace-packages=true
\ No newline at end of file
+inject-workspace-packages=true
diff --git a/apps/frontend/next.config.js b/apps/frontend/next.config.js
index 91480e47e..3cc9bb9c2 100644
--- a/apps/frontend/next.config.js
+++ b/apps/frontend/next.config.js
@@ -42,10 +42,8 @@ const nextConfig = {
];
},
};
-export default !!process.env.SENTRY_ORG
- ? withSentryConfig(nextConfig, {
- org: process.env.SENTRY_ORG,
- project: process.env.SENTRY_PROJECT,
- authToken: process.env.SENTRY_AUTH_TOKEN,
- })
- : nextConfig;
+export default withSentryConfig(nextConfig, {
+ org: process.env.SENTRY_ORG,
+ project: process.env.SENTRY_PROJECT,
+ authToken: process.env.SENTRY_AUTH_TOKEN,
+});
diff --git a/apps/frontend/src/app/global-error.tsx b/apps/frontend/src/app/global-error.tsx
index 395e9ed25..b014f08cb 100644
--- a/apps/frontend/src/app/global-error.tsx
+++ b/apps/frontend/src/app/global-error.tsx
@@ -2,13 +2,18 @@
import * as Sentry from '@sentry/nextjs';
import NextError from 'next/error';
import { useEffect } from 'react';
+import { useVariables } from '@gitroom/react/helpers/variable.context';
export default function GlobalError({
error,
}: {
error: Error & { digest?: string };
}) {
+ const { sentryDsn } = useVariables();
useEffect(() => {
+ if (!sentryDsn) {
+ return;
+ }
Sentry.captureException(error);
}, [error]);
return (
diff --git a/libraries/nestjs-libraries/src/integrations/social/instagram.provider.ts b/libraries/nestjs-libraries/src/integrations/social/instagram.provider.ts
index 2ca9b079e..f4a01c9e5 100644
--- a/libraries/nestjs-libraries/src/integrations/social/instagram.provider.ts
+++ b/libraries/nestjs-libraries/src/integrations/social/instagram.provider.ts
@@ -615,6 +615,48 @@ export class InstagramProvider
return arr;
}
+ private setTitle(name: string) {
+ switch (name) {
+ case "likes": {
+ return 'Likes';
+ }
+
+ case "followers": {
+ return 'Followers';
+ }
+
+ case "reach": {
+ return 'Reach';
+ }
+
+ case "follower_count": {
+ return 'Follower Count';
+ }
+
+ case "views": {
+ return 'Views';
+ }
+
+ case "comments": {
+ return 'Comments';
+ }
+
+ case "shares": {
+ return 'Shares';
+ }
+
+ case "saves": {
+ return 'Saves';
+ }
+
+ case "replies": {
+ return 'Replies';
+ }
+ }
+
+ return "";
+ }
+
async analytics(
id: string,
accessToken: string,
@@ -639,7 +681,7 @@ export class InstagramProvider
analytics.push(
...(data?.map((d: any) => ({
- label: d.title,
+ label: this.setTitle(d.name),
percentageChange: 5,
data: d.values.map((v: any) => ({
total: v.value,
@@ -650,7 +692,7 @@ export class InstagramProvider
analytics.push(
...data2.map((d: any) => ({
- label: d.title,
+ label: this.setTitle(d.name),
percentageChange: 5,
data: [
{