Skip to content

Commit

Permalink
removed vh reasigning (#47)
Browse files Browse the repository at this point in the history
Co-authored-by: Yehor Podporinov <[email protected]>
  • Loading branch information
yehor-podporinov and Yehor Podporinov authored Oct 23, 2023
1 parent 6992f76 commit da3d831
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,12 @@

<script lang="ts" setup>
import { useViewportSizes } from '@/composables'
import { debounce } from 'lodash-es'
import { onBeforeUnmount, onMounted } from 'vue'
import { onMounted } from 'vue'
import 'virtual:svg-icons-register'
const { assignVhCssVariable } = useViewportSizes()
const assignVhCssVariableDebounced = debounce(assignVhCssVariable, 200)
onMounted(() => {
assignVhCssVariable()
window.addEventListener('resize', assignVhCssVariableDebounced)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', assignVhCssVariableDebounced)
})
</script>

0 comments on commit da3d831

Please sign in to comment.