- {query && (
-
diff --git a/client/src/core/client/stream/tabs/Comments/Stream/CommentForm/MediaField.tsx b/client/src/core/client/stream/tabs/Comments/Stream/CommentForm/MediaField.tsx
index fb3b2663ab..94d393b124 100644
--- a/client/src/core/client/stream/tabs/Comments/Stream/CommentForm/MediaField.tsx
+++ b/client/src/core/client/stream/tabs/Comments/Stream/CommentForm/MediaField.tsx
@@ -1,4 +1,3 @@
-import { IGif } from "@giphy/js-types";
import React, { FunctionComponent, useCallback, useEffect } from "react";
import { useField } from "react-final-form";
@@ -17,9 +16,10 @@ import {
MediaPreview,
} from "../../Comment/MediaConfirmation";
import ExternalImageInput from "../../ExternalImageInput";
+import { GifResult } from "../../GifGrid";
import GiphyInput, { GifPreview } from "../../GiphyInput";
import { getMediaValidators } from "../../helpers";
-import TenorInput, { GifResult } from "../../TenorInput/TenorInput";
+import TenorInput from "../../TenorInput/TenorInput";
export type Widget = "gifs" | "external" | null;
@@ -63,11 +63,11 @@ const MediaField: FunctionComponent
= ({
});
const onGiphySelect = useCallback(
- (gif: IGif) => {
+ (gif: GifResult) => {
onChange({
type: "giphy",
id: gif.id,
- url: gif.images.original.url,
+ url: gif.url,
});
setWidget(null);
},
diff --git a/client/src/core/client/stream/tabs/Comments/TenorInput/TenorInput.tsx b/client/src/core/client/stream/tabs/Comments/TenorInput/TenorInput.tsx
index 5d0f62e6fd..1d052bb62c 100644
--- a/client/src/core/client/stream/tabs/Comments/TenorInput/TenorInput.tsx
+++ b/client/src/core/client/stream/tabs/Comments/TenorInput/TenorInput.tsx
@@ -1,4 +1,3 @@
-import { Localized } from "@fluent/react/compat";
import React, {
ChangeEventHandler,
FunctionComponent,
@@ -14,11 +13,11 @@ import useResizeObserver from "use-resize-observer";
import { useDebounce } from "coral-framework/hooks";
import { useCoralContext } from "coral-framework/lib/bootstrap";
import useFetchWithAuth from "coral-stream/common/useFetchWithAuth";
-import { ButtonSvgIcon, SearchIcon } from "coral-ui/components/icons";
-import { Button, HorizontalGutter, TextField } from "coral-ui/components/v2";
+import { HorizontalGutter } from "coral-ui/components/v2";
+import { GifGrid, GifResult } from "../GifGrid";
+import { GifSearchInput } from "../GifSearchInput/GifSearchInput";
import TenorAttribution from "./TenorAttribution";
-import TenorGrid from "./TenorGrid";
import styles from "./TenorInput.css";
@@ -29,13 +28,6 @@ interface Props {
forwardRef?: Ref;
}
-export interface GifResult {
- id: string;
- url: string;
- preview: string;
- title?: string;
-}
-
export interface SearchPayload {
results: GifResult[];
next?: string;
@@ -157,32 +149,14 @@ const TenorInput: FunctionComponent = ({ onSelect }) => {
return (
-