Trigger welcomeConsole only once on chat, shared chat page load

This commit is contained in:
Debanjum Singh Solanky
2024-08-02 01:57:30 +05:30
parent cab0957fd3
commit 7858aff2e2
2 changed files with 4 additions and 4 deletions

View File

@@ -105,9 +105,6 @@ export default function SharedChat() {
const locationData = useIPLocationData();
const authenticatedData = useAuthenticatedData();
welcomeConsole();
useEffect(() => {
fetch('/api/chat/options')
.then(response => response.json())
@@ -123,6 +120,8 @@ export default function SharedChat() {
return;
});
welcomeConsole();
setIsMobileWidth(window.innerWidth < 786);
window.addEventListener('resize', () => {