From b8e3f53b23a23b4e1cbab05fc24a3d697c12f584 Mon Sep 17 00:00:00 2001 From: Nevo David Date: Fri, 11 Jul 2025 12:25:30 +0700 Subject: [PATCH] feat: fix tiktok for photos --- .../providers/tiktok/tiktok.provider.tsx | 12 ++- .../posts/providers-settings/tiktok.dto.ts | 10 +-- .../integrations/social/facebook.provider.ts | 7 ++ .../integrations/social/tiktok.provider.ts | 85 +++++++++++++++++-- 4 files changed, 102 insertions(+), 12 deletions(-) diff --git a/apps/frontend/src/components/new-launch/providers/tiktok/tiktok.provider.tsx b/apps/frontend/src/components/new-launch/providers/tiktok/tiktok.provider.tsx index 45b113af..df606b9d 100644 --- a/apps/frontend/src/components/new-launch/providers/tiktok/tiktok.provider.tsx +++ b/apps/frontend/src/components/new-launch/providers/tiktok/tiktok.provider.tsx @@ -19,6 +19,8 @@ import { useCustomProviderFunction } from '@gitroom/frontend/components/launches import { Checkbox } from '@gitroom/react/form/checkbox'; import clsx from 'clsx'; import { useT } from '@gitroom/react/translation/get.transation.service.client'; +import { useIntegration } from '@gitroom/frontend/components/launches/helpers/use.integration'; +import { Input } from '@gitroom/react/form/input'; const CheckTikTokValidity: FC<{ picture: string; @@ -85,9 +87,14 @@ const CheckTikTokValidity: FC<{ const TikTokSettings: FC<{ values?: any; }> = (props) => { - const { watch, register, formState, control } = useSettings(); + const { watch, register } = useSettings(); + const { value } = useIntegration(); const t = useT(); + const isTitle = useMemo(() => { + return value?.[0].image.some((p) => p.path.indexOf('mp4') === -1); + }, [value]); + const disclose = watch('disclose'); const brand_organic_toggle = watch('brand_organic_toggle'); const brand_content_toggle = watch('brand_content_toggle'); @@ -142,6 +149,9 @@ const TikTokSettings: FC<{ return (
+ {isTitle && ( + + )}