From e436a4ea43861051c1f0bb1ad2eb49c058ab6761 Mon Sep 17 00:00:00 2001 From: Gianni Ferullo Date: Wed, 24 Apr 2024 15:45:31 -0400 Subject: [PATCH] types: remove IBottleData and let host application define it --- packages/components/src/components/gif.tsx | 4 ++-- packages/types/src/gif.ts | 10 +--------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/packages/components/src/components/gif.tsx b/packages/components/src/components/gif.tsx index 0cd6916b..f55382d3 100644 --- a/packages/components/src/components/gif.tsx +++ b/packages/components/src/components/gif.tsx @@ -168,8 +168,8 @@ const Gif = ({ } const trackWithMoat = async () => { if (shouldShowMedia && container.current) { - const { bottle_data: bottleData, response_id } = gif - const moatCompatibleData = constructMoatData(bottleData as any) + const { bottle_data, response_id } = gif + const moatCompatibleData = constructMoatData(bottle_data as any) if (moatCompatibleData) { moatCompatibleData.zMoatSession = response_id await moatLoader diff --git a/packages/types/src/gif.ts b/packages/types/src/gif.ts index 930338c0..74cfda35 100644 --- a/packages/types/src/gif.ts +++ b/packages/types/src/gif.ts @@ -2,14 +2,6 @@ import { IImages } from './images' import IUser from './user' import IVideo from './video' -interface IBottleData { - tid?: string - tags?: string[] - tdata?: { - click_out_url?: string - } -} - export type GifID = string | number export default interface IGif { @@ -37,7 +29,7 @@ export default interface IGif { is_scheduled: boolean is_removed: boolean tags: string[] - bottle_data: IBottleData + bottle_data: any response_id: string analytics_response_payload: string video?: IVideo