mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-07 21:29:13 +00:00
Trigger welcomeConsole only once on chat, shared chat page load
This commit is contained in:
@@ -112,7 +112,6 @@ export default function Chat() {
|
|||||||
const locationData = useIPLocationData();
|
const locationData = useIPLocationData();
|
||||||
|
|
||||||
const authenticatedData = useAuthenticatedData();
|
const authenticatedData = useAuthenticatedData();
|
||||||
welcomeConsole();
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetch('/api/chat/options')
|
fetch('/api/chat/options')
|
||||||
@@ -129,6 +128,8 @@ export default function Chat() {
|
|||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
welcomeConsole();
|
||||||
|
|
||||||
setIsMobileWidth(window.innerWidth < 786);
|
setIsMobileWidth(window.innerWidth < 786);
|
||||||
|
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
|
|||||||
@@ -105,9 +105,6 @@ export default function SharedChat() {
|
|||||||
const locationData = useIPLocationData();
|
const locationData = useIPLocationData();
|
||||||
const authenticatedData = useAuthenticatedData();
|
const authenticatedData = useAuthenticatedData();
|
||||||
|
|
||||||
welcomeConsole();
|
|
||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetch('/api/chat/options')
|
fetch('/api/chat/options')
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
@@ -123,6 +120,8 @@ export default function SharedChat() {
|
|||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
welcomeConsole();
|
||||||
|
|
||||||
setIsMobileWidth(window.innerWidth < 786);
|
setIsMobileWidth(window.innerWidth < 786);
|
||||||
|
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user