mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-14 19:36:24 +00:00
Small fixes chat
This commit is contained in:
parent
8ae18f8b2a
commit
2293a8922d
@ -44,7 +44,7 @@ const EncryptedSocketChat: React.FC<Props> = ({
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
||||||
const audio = new Audio(`/static/assets/sounds/chat-open.mp3`);
|
const [audio] = useState(() => new Audio(`/static/assets/sounds/chat-open.mp3`));
|
||||||
const [connected, setConnected] = useState<boolean>(false);
|
const [connected, setConnected] = useState<boolean>(false);
|
||||||
const [peerConnected, setPeerConnected] = useState<boolean>(false);
|
const [peerConnected, setPeerConnected] = useState<boolean>(false);
|
||||||
const [peerPubKey, setPeerPubKey] = useState<string>();
|
const [peerPubKey, setPeerPubKey] = useState<string>();
|
||||||
|
@ -43,7 +43,7 @@ const EncryptedTurtleChat: React.FC<Props> = ({
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
||||||
const audio = new Audio(`/static/assets/sounds/chat-open.mp3`);
|
const [audio] = useState(() => new Audio(`/static/assets/sounds/chat-open.mp3`));
|
||||||
const [peerConnected, setPeerConnected] = useState<boolean>(false);
|
const [peerConnected, setPeerConnected] = useState<boolean>(false);
|
||||||
const [peerPubKey, setPeerPubKey] = useState<string>();
|
const [peerPubKey, setPeerPubKey] = useState<string>();
|
||||||
const [value, setValue] = useState<string>('');
|
const [value, setValue] = useState<string>('');
|
||||||
|
@ -294,10 +294,11 @@ export const useAppStore = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const fetchOrder = function () {
|
const fetchOrder = function () {
|
||||||
if (currentOrder != undefined) {
|
if (currentOrder) {
|
||||||
apiClient
|
apiClient
|
||||||
.get(baseUrl, '/api/order/?order_id=' + currentOrder, { tokenSHA256: robot.tokenSHA256 })
|
.get(baseUrl, '/api/order/?order_id=' + currentOrder, { tokenSHA256: robot.tokenSHA256 })
|
||||||
.then(orderReceived);
|
.then(orderReceived)
|
||||||
|
.catch(orderReceived);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user