Skip to content

Commit

Permalink
loop
Browse files Browse the repository at this point in the history
  • Loading branch information
aeltorio committed Nov 6, 2024
1 parent 8d213af commit 2067493
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/aipane/components/Aipane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const Aipane: React.FC<AipaneProps> = (props: AipaneProps): React.JSX.Element =>
* @state isOutlook
* @description Whether the application is running in Outlook.
*/
const [isOutlook, setIsOutlook] = useState(false);
const [isOutlook, setIsOutlook] = useState(null as boolean | null);

/**
* @constant listItems
Expand Down Expand Up @@ -204,10 +204,12 @@ const Aipane: React.FC<AipaneProps> = (props: AipaneProps): React.JSX.Element =>

// Show the version number, the build date and the target use in the console
// eslint-disable-next-line no-console
isOutlookClient().then((isOutlook) => {
setIsOutlook(isOutlook);
console.log(`Version: ${versionInfo.commit} Date: ${versionInfo.date} Runs on Outlook: ${isOutlook}`);
});
if (isOutlook == null) {
isOutlookClient().then((isOutlook) => {
setIsOutlook(isOutlook);
console.log(`Version: ${versionInfo.commit} Date: ${versionInfo.date} Runs on Outlook: ${isOutlook}`);
});
}

return (
<div className={styles.root}>
Expand Down

0 comments on commit 2067493

Please sign in to comment.