forked from microsoft/BotFramework-WebChat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from compulim/feat-pending-upload
Incorporate PR changes
- Loading branch information
Showing
38 changed files
with
2,258 additions
and
2,143 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { WebChatPostActivityAttachment } from 'botframework-webchat-core'; | ||
import { useMemo, type Dispatch, type SetStateAction } from 'react'; | ||
|
||
import { useSelector } from './internal/WebChatReduxContext'; | ||
import useWebChatAPIContext from './internal/useWebChatAPIContext'; | ||
|
||
export default function useSendBoxAttachments(): readonly [ | ||
readonly WebChatPostActivityAttachment[], | ||
Dispatch<SetStateAction<readonly WebChatPostActivityAttachment[]>> | ||
] { | ||
// TODO: We should use the selector from "core" package. | ||
const sendBoxAttachments = useSelector(({ sendBoxAttachments }) => sendBoxAttachments); | ||
const { setSendBoxAttachments } = useWebChatAPIContext(); | ||
|
||
return useMemo( | ||
() => Object.freeze([sendBoxAttachments, setSendBoxAttachments]), | ||
[sendBoxAttachments, setSendBoxAttachments] | ||
); | ||
} |
Oops, something went wrong.