diff --git a/src/aipane/components/Aipane.tsx b/src/aipane/components/Aipane.tsx index e8fef80..7cc4408 100644 --- a/src/aipane/components/Aipane.tsx +++ b/src/aipane/components/Aipane.tsx @@ -9,8 +9,7 @@ import * as React from "react"; import { useState, useEffect } from "react"; import Header from "./Header"; -// eslint-disable-next-line @typescript-eslint/no-unused-vars -import HeroList, { HeroListItem } from "./HeroList"; +import { HeroListItem } from "./HeroList"; import TextInsertion from "./TextInsertion"; import { makeStyles } from "@fluentui/react-components"; import { BrainCircuit20Regular } from "@fluentui/react-icons"; diff --git a/src/aipane/components/HeroComboPrompts.tsx b/src/aipane/components/HeroComboPrompts.tsx index 42d3afe..857f54b 100644 --- a/src/aipane/components/HeroComboPrompts.tsx +++ b/src/aipane/components/HeroComboPrompts.tsx @@ -34,15 +34,15 @@ const HeroComboPrompts: React.FC = ({ onChange }) => { const inputId = useId("input"); const [selectedValue, setSelectedValue] = useState(config.prompts[0].id); const [prompts, setPrompts] = useState([]); + const [isOutlook, setIsOutlook] = useState(false); // Filter out standalone prompts if the client is Outlook // Standalone prompts should be used in standalone mode only useEffect(() => { - const loadPrompts = async () => { - const isOutlook = await isOutlookClient(); + isOutlookClient().then((_isOutlook) => { + setIsOutlook(_isOutlook); setPrompts(getPrompts(!isOutlook)); - }; - loadPrompts(); + }); }, []); const handleChange = useCallback(