Skip to content

Commit

Permalink
code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
aeltorio committed Nov 6, 2024
1 parent 1142a49 commit cbcef7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/aipane/components/Aipane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
8 changes: 4 additions & 4 deletions src/aipane/components/HeroComboPrompts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ const HeroComboPrompts: React.FC<HeroComboPromptsProps> = ({ onChange }) => {
const inputId = useId("input");
const [selectedValue, setSelectedValue] = useState<string>(config.prompts[0].id);
const [prompts, setPrompts] = useState<AIPrompt[]>([]);
const [isOutlook, setIsOutlook] = useState<boolean>(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(
Expand Down

0 comments on commit cbcef7d

Please sign in to comment.