Skip to content

Commit

Permalink
removed generic type
Browse files Browse the repository at this point in the history
  • Loading branch information
anguyen-yext2 committed Jun 17, 2024
1 parent d10384d commit 4d486db
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/components/GenerativeDirectAnswer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const builtInCssClasses: Readonly<GenerativeDirectAnswerCssClasses> = {
*
* @public
*/
export interface GenerativeDirectAnswerProps<T> {
export interface GenerativeDirectAnswerProps {
/** CSS classes for customizing the component styling. */
customCssClasses?: GenerativeDirectAnswerCssClasses,
/** The header for the answer section of the generative direct answer. */
Expand All @@ -58,11 +58,11 @@ export interface GenerativeDirectAnswerProps<T> {
* @param props - {@link GenerativeDirectAnswerProps}
* @returns A React element for the generative direct answer, or null if there is no generated answer
*/
export function GenerativeDirectAnswer<T>({
export function GenerativeDirectAnswer({
customCssClasses,
answerHeader,
citationsHeader
}: GenerativeDirectAnswerProps<T>): JSX.Element | null {
}: GenerativeDirectAnswerProps): JSX.Element | null {
const cssClasses = useComposedCssClasses(builtInCssClasses, customCssClasses);

const universalResults = useSearchState(state => state.universal);
Expand Down Expand Up @@ -100,7 +100,7 @@ export function GenerativeDirectAnswer<T>({
);
}

interface AnswerProps<T> extends GenerativeDirectAnswerProps<T> {
interface AnswerProps extends GenerativeDirectAnswerProps {
gdaResponse: GenerativeDirectAnswerResponse,
cssClasses: GenerativeDirectAnswerCssClasses,
answerHeader?: string | JSX.Element,
Expand All @@ -109,7 +109,7 @@ interface AnswerProps<T> extends GenerativeDirectAnswerProps<T> {
/**
* The answer section of the Generative Direct Answer.
*/
function Answer<T>(props: AnswerProps<T>) {
function Answer(props: AnswerProps) {
const {
gdaResponse,
cssClasses,
Expand All @@ -123,7 +123,7 @@ function Answer<T>(props: AnswerProps<T>) {
</>;
}

interface CitationsProps<T> extends GenerativeDirectAnswerProps<T> {
interface CitationsProps extends GenerativeDirectAnswerProps {
gdaResponse: GenerativeDirectAnswerResponse,
cssClasses: GenerativeDirectAnswerCssClasses,
citationsHeader?: string | JSX.Element,
Expand All @@ -133,7 +133,7 @@ interface CitationsProps<T> extends GenerativeDirectAnswerProps<T> {
/**
* The citations section of the Generative Direct Answer.
*/
function Citations<T>(props: CitationsProps<T>) {
function Citations(props: CitationsProps) {
const {
gdaResponse,
cssClasses,
Expand All @@ -155,7 +155,7 @@ function Citations<T>(props: CitationsProps<T>) {
}

function Citation(searchResults: Result[], citation: string, cssClasses: GenerativeDirectAnswerCssClasses) {
const rawResult: Result | undefined = searchResults.find(r => r.rawData.uid === citation)
const rawResult: Result | undefined = searchResults.find(r => r.rawData.uid === citation);
if (!rawResult) {
return null;
}
Expand Down

0 comments on commit 4d486db

Please sign in to comment.