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

@@ -112,7 +112,6 @@ export default function Chat() {
const locationData = useIPLocationData();
const authenticatedData = useAuthenticatedData();
welcomeConsole();
useEffect(() => {
fetch('/api/chat/options')
@@ -129,6 +128,8 @@ export default function Chat() {
return;
});
welcomeConsole();
setIsMobileWidth(window.innerWidth < 786);
window.addEventListener('resize', () => {

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', () => {