From 96e312816595a07b66f3b7df4a183909644a4815 Mon Sep 17 00:00:00 2001 From: Disha Date: Thu, 25 Jan 2024 16:50:13 +0530 Subject: [PATCH] updated variable name and fix cross origin error --- schema.graphql | 2 +- src/GraphQl/Mutations/mutations.ts | 4 ++-- .../core/AdvertisementEntry/AdvertisementEntry.tsx | 1 + .../AdvertisementRegister/AdvertisementRegister.tsx | 10 ++++++++-- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/schema.graphql b/schema.graphql index 0543bad00b..785311f8a8 100644 --- a/schema.graphql +++ b/schema.graphql @@ -409,7 +409,7 @@ input CreateAdvertisementInput { organizationId: ID! startDate: Date! type: String! - file: String! + mediaFile: String! } type CreateAdvertisementPayload { diff --git a/src/GraphQl/Mutations/mutations.ts b/src/GraphQl/Mutations/mutations.ts index ba8f014bc7..f689167dfe 100644 --- a/src/GraphQl/Mutations/mutations.ts +++ b/src/GraphQl/Mutations/mutations.ts @@ -436,7 +436,7 @@ export const ADD_ADVERTISEMENT_MUTATION = gql` type: $type startDate: $startDate endDate: $endDate - file: $file + mediaFile: $file } ) { _id @@ -456,7 +456,7 @@ export const UPDATE_ADVERTISEMENT_MUTATION = gql` input: { _id: $id name: $name - file: $file + mediaFile: $file type: $type startDate: $startDate endDate: $endDate diff --git a/src/components/Advertisements/core/AdvertisementEntry/AdvertisementEntry.tsx b/src/components/Advertisements/core/AdvertisementEntry/AdvertisementEntry.tsx index 899e840d2c..40cacb0442 100644 --- a/src/components/Advertisements/core/AdvertisementEntry/AdvertisementEntry.tsx +++ b/src/components/Advertisements/core/AdvertisementEntry/AdvertisementEntry.tsx @@ -97,6 +97,7 @@ function advertisementEntry({ loop={true} playsInline data-testid="media" + crossOrigin="anonymous" > diff --git a/src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx b/src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx index 61e97a1d5c..2e78a7fb5d 100644 --- a/src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx +++ b/src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx @@ -249,8 +249,14 @@ function advertisementRegister({ /> {formState.advertisementMedia && (
- {formState.advertisementMedia.includes('data:video') ? ( -