Skip to content

Commit

Permalink
fix: cleanup for resize event listener and Navbar warn
Browse files Browse the repository at this point in the history
  • Loading branch information
jialudev committed Dec 26, 2024
1 parent b35b8b4 commit 77a3e0d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion frontend/src/components/navbar/MenuItems.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
</template>

<script setup>
import { ref, watch, onMounted } from 'vue'
import { ref, watch, onMounted, onUnmounted } from 'vue'
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
Expand All @@ -142,6 +142,10 @@
}
})
onUnmounted(() => {
window.removeEventListener('resize', handleResize)
})
watch(currentScreenWidth, (newVal) => {
if (window.innerWidth > 768) {
adjustMenuItems()
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/components/navbar/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,8 @@
export default {
props: {
logo: String,
isLoggedIn: String
isLoggedIn: String,
starChainUrl: String
},
data() {
const classParam = new URLSearchParams(window.location.search).get(
Expand Down

0 comments on commit 77a3e0d

Please sign in to comment.