Skip to content

Commit

Permalink
moat data updates
Browse files Browse the repository at this point in the history
  • Loading branch information
giannif committed May 2, 2024
1 parent d1851ca commit bb504b3
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 99 deletions.
8 changes: 0 additions & 8 deletions .changeset/fluffy-pots-notice.md

This file was deleted.

6 changes: 4 additions & 2 deletions packages/react-components/src/components/gif.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import { giphyBlue, giphyGreen, giphyPurple, giphyRed, giphyYellow } from '@giphy/colors'
import { IGif, IUser, ImageAllTypes } from '@giphy/js-types'
import { Logger, getAltText, getBestRendition, getGifHeight } from '@giphy/js-util'
import MoatTracking from './moat-tracking'
import 'intersection-observer'
import React, { ElementType, ReactNode, SyntheticEvent, useContext, useEffect, useRef, useState } from 'react'
import styled from 'styled-components'
Expand Down Expand Up @@ -290,8 +289,11 @@ const Gif = ({
alt={getAltText(gif)}
onLoad={shouldShowMedia ? onImageLoad : () => {}}
/>
{isAd &&
bottleData?.tags?.map((tag: string, index: number) => (
<div dangerouslySetInnerHTML={{ __html: tag }} key={index} />
))}
</picture>
{isAd && <MoatTracking bottleData={bottleData} />}
{Overlay && (
// only render the overlay on the client since it depends on shouldShowMedia
<RenderOnClient>
Expand Down
24 changes: 0 additions & 24 deletions packages/react-components/src/components/moat-tracking.tsx

This file was deleted.

25 changes: 4 additions & 21 deletions packages/react-components/stories/gif.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,27 +106,10 @@ export const GifWithOverlay: Story = {
export const GifWithAd: Story = {
args: {
bottle_data: {
tid: 'd7494a8384b6906a880ff6dcc16a7151d3f2a3e8413be76e9ddb4ee1f8dc9fd0',
tags: [],
tdata: {
om: [],
bartab: [],
web: [
{
vendor: 'Moat',
verificationParameters: {
moatClientLevel1: 'Giphy',
moatClientLevel2: 'Giphy',
moatClientLevel3: 'Giphy',
moatClientLevel4: 'Giphy',
moatClientSlicer1: 'Giphy',
moatClientSlicer2: 'Giphy',
zMoatPosition: 'Giphy',
},
},
],
click_out_url: '',
},
tid: '8691c382d3eed000da83ecc2ceef747b91190ab0e5bc0bc95ff5c80eeda242fa',
tags: [
'<noscript class="MOAT-giphydisplay879451385633?moatClientLevel1=ff6046d1-7125-462a-809c-efa338464775&amp;moatClientLevel2=e66d47a2-1b13-4b74-a34d-23fbdc10ddb5&amp;moatClientLevel3=82&amp;moatClientLevel4=3o7WIw8TV4UJROSElW&amp;moatClientSlicer1=e26c89fe-fb01-4442-9e8f-37940600265c&amp;moatClientSlicer2=giphytrending"></noscript><script src="https://z.moatads.com/giphydisplay879451385633/moatad.js#moatClientLevel1=ff6046d1-7125-462a-809c-efa338464775&moatClientLevel2=e66d47a2-1b13-4b74-a34d-23fbdc10ddb5&moatClientLevel3=82&moatClientLevel4=3o7WIw8TV4UJROSElW&moatClientSlicer1=e26c89fe-fb01-4442-9e8f-37940600265c&moatClientSlicer2=giphytrending" type="text/javascript"></script>',
],
},
},
}
Expand Down
44 changes: 0 additions & 44 deletions packages/util/src/construct-moat-data.ts

This file was deleted.

0 comments on commit bb504b3

Please sign in to comment.