Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 40x 40x 19x 21x | import React from "react";
import { useConversationContext } from "../ConversationProvider";
import { GiveConversationSections } from "../constants";
import MessageInput from "../components/MessageInput";
import { NewMessageFooter } from "../components/NewMessageFooter";
function FooterSelector() {
const { sectionInView } = useConversationContext();
switch (sectionInView) {
case GiveConversationSections.MESSAGE_CHATS:
case GiveConversationSections.MESSAGE_NEW:
return <MessageInput />;
case GiveConversationSections.MESSAGE_LIST:
return <NewMessageFooter />;
default:
return null;
}
}
export default FooterSelector;
|