{contentContainer}
diff --git a/src/widget/Popup/MessageInput.tsx b/src/widget/Popup/MessageInput.tsx
index 83ef42ba..3588bca3 100644
--- a/src/widget/Popup/MessageInput.tsx
+++ b/src/widget/Popup/MessageInput.tsx
@@ -2,6 +2,8 @@ import { useRef, useState, memo } from 'react';
import clsx from 'clsx';
import useSendMessage from '../../common/hook/useSendMessage';
import { useWidget } from '../WidgetContext';
+import IconSend from '../../assets/icons/send.svg';
+import { useTranslation } from 'react-i18next';
@@ -11,6 +13,7 @@ type Props = {
}
let isComposing = false;
const MessageInput = (props: Props) => {
+ const { t } = useTranslation("widget");
const { color } = useWidget();
const { from, to } = props;
const { sendMessage } = useSendMessage({
@@ -27,16 +30,23 @@ const MessageInput = (props: Props) => {
`ring-1 ring-gray-200 dark:ring-gray-800 focus:ring-2 focus:ring-[${color}]`,
'focus:outline-none',
);
+ const handleSend = () => {
+ sendMessage({
+ type: "text",
+ content
+ });
+ setContent("");
+ };
return (
-
);
diff --git a/src/widget/Popup/Welcome.tsx b/src/widget/Popup/Welcome.tsx
index 8f4b436b..6e9a5103 100644
--- a/src/widget/Popup/Welcome.tsx
+++ b/src/widget/Popup/Welcome.tsx
@@ -2,25 +2,28 @@
import { memo } from 'react';
import { useAppSelector } from '../../app/store';
import Login from './Login';
+import { useTranslation } from 'react-i18next';
type Props = {
needLogin?: boolean
}
const Index = ({ needLogin = false }: Props) => {
const { logo } = useAppSelector(store => store.server);
+ const { t } = useTranslation("widget");
+ // console.log("logooo", logo);
return (
<>
-

+ {logo &&

}
{needLogin ?
- `👋 Hi there, Nice to meet you! Please login before we have a nice talk 👇`
+ t("welcome_not_login")
:
- `👋 Hi there, Nice to meet you! `}
+ t("welcome")}