1
Fork 0

Fix swapped states

This commit is contained in:
Tobias Berger 2022-01-27 15:21:35 +00:00 committed by GitHub
parent 3eb1c87f05
commit 58adf03193

View file

@ -27,10 +27,10 @@ let shouldResendTyping = true;
export default function Index(): JSX.Element { export default function Index(): JSX.Element {
const [messageHistory, setMessageHistory] = useState<TextMessage[]>([]); const [messageHistory, setMessageHistory] = useState<TextMessage[]>([]);
const [currentlyTyping, setCurrentlyTyping] = useState<string[]>([]); const [currentlyTyping, setCurrentlyTyping] = useState<string[]>([]);
const [authorId, setAuthorId] = useState("wss.tobot.tk:8085/"); const [authorId, setAuthorId] = useState("<...>");
const [connectedUsers, setConnectedUsers] = useState<ConnectedUser[]>([]); const [connectedUsers, setConnectedUsers] = useState<ConnectedUser[]>([]);
const [desiredName, setDesiredName] = useState<string | undefined>(undefined); const [desiredName, setDesiredName] = useState<string | undefined>(undefined);
const [socketUrl, setSocketUrl] = useState(""); const [socketUrl, setSocketUrl] = useState("wss.tobot.tk:8085");
const messageInput = useRef<HTMLInputElement>(null); const messageInput = useRef<HTMLInputElement>(null);
const messageContainer = useRef<HTMLOListElement>(null); const messageContainer = useRef<HTMLOListElement>(null);