mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-07 21:29:13 +00:00
Standardized the mobile width calculation
This commit is contained in:
@@ -270,11 +270,11 @@ export default function Agents() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (typeof window !== "undefined") {
|
if (typeof window !== "undefined") {
|
||||||
setIsMobileWidth(window.innerWidth < 768);
|
setIsMobileWidth(window.innerWidth < 786);
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener("resize", () => {
|
window.addEventListener("resize", () => {
|
||||||
setIsMobileWidth(window.innerWidth < 768);
|
setIsMobileWidth(window.innerWidth < 786);
|
||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|||||||
@@ -985,12 +985,12 @@ export default function Automations() {
|
|||||||
const ipLocationData = useIPLocationData();
|
const ipLocationData = useIPLocationData();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (window.innerWidth < 768) {
|
if (window.innerWidth < 786) {
|
||||||
setIsMobileWidth(true);
|
setIsMobileWidth(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener("resize", () => {
|
window.addEventListener("resize", () => {
|
||||||
setIsMobileWidth(window.innerWidth < 768);
|
setIsMobileWidth(window.innerWidth < 786);
|
||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|||||||
@@ -79,10 +79,10 @@ export default function ChatHistory(props: ChatHistoryProps) {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
window.addEventListener("resize", () => {
|
window.addEventListener("resize", () => {
|
||||||
setIsMobileWidth(window.innerWidth < 768);
|
setIsMobileWidth(window.innerWidth < 786);
|
||||||
});
|
});
|
||||||
|
|
||||||
setIsMobileWidth(window.innerWidth < 768);
|
setIsMobileWidth(window.innerWidth < 786);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
@@ -43,10 +43,10 @@ export default function NavMenu() {
|
|||||||
const [initialLoadDone, setInitialLoadDone] = useState(false);
|
const [initialLoadDone, setInitialLoadDone] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setIsMobileWidth(window.innerWidth < 768);
|
setIsMobileWidth(window.innerWidth < 786);
|
||||||
|
|
||||||
window.addEventListener("resize", () => {
|
window.addEventListener("resize", () => {
|
||||||
setIsMobileWidth(window.innerWidth < 768);
|
setIsMobileWidth(window.innerWidth < 786);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (localStorage.getItem("theme") === "dark") {
|
if (localStorage.getItem("theme") === "dark") {
|
||||||
|
|||||||
@@ -152,10 +152,10 @@ function ReferenceVerification(props: ReferenceVerificationProps) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
setIsMobileWidth(window.innerWidth < 768);
|
setIsMobileWidth(window.innerWidth < 786);
|
||||||
|
|
||||||
window.addEventListener("resize", () => {
|
window.addEventListener("resize", () => {
|
||||||
setIsMobileWidth(window.innerWidth < 768);
|
setIsMobileWidth(window.innerWidth < 786);
|
||||||
});
|
});
|
||||||
}, [verificationStatement, props.conversationId, props.prefilledResponse]);
|
}, [verificationStatement, props.conversationId, props.prefilledResponse]);
|
||||||
|
|
||||||
@@ -283,10 +283,10 @@ export default function FactChecker() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setIsMobileWidth(window.innerWidth < 768);
|
setIsMobileWidth(window.innerWidth < 786);
|
||||||
|
|
||||||
window.addEventListener("resize", () => {
|
window.addEventListener("resize", () => {
|
||||||
setIsMobileWidth(window.innerWidth < 768);
|
setIsMobileWidth(window.innerWidth < 786);
|
||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user