Skip to content

Commit 761c124

Browse files
committed
Added handeling for components that should be rendered on the client side only
1 parent 09040e5 commit 761c124

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/.vuepress/components/Chat.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export default {
9999
botTitle: "AI Assistant",
100100
},
101101
iframeUrl: "https://chatbot.cloudlinux.com/docs/imunify360",
102-
windowWidth: window.innerWidth,
102+
windowWidth: 0, // Changed from window.innerWidth to avoid SSR error
103103
};
104104
},
105105
computed: {
@@ -109,6 +109,7 @@ export default {
109109
},
110110
mounted() {
111111
window.addEventListener("resize", this.handleResize);
112+
this.handleResize(); // Set initial windowWidth on client-side
112113
},
113114
beforeUnmount() {
114115
window.removeEventListener("resize", this.handleResize);
@@ -128,7 +129,7 @@ export default {
128129
</script>
129130

130131
<style lang="stylus" scoped>
131-
$primary-color = #43a069
132+
$primary-color = #3f83f8
132133
$background-color = white
133134
$border-radius = 16px
134135
mobile-breakpoint = 768px

0 commit comments

Comments
 (0)