kodadot/nft-gallery

View on GitHub
middleware/modal.global.ts

Summary

Maintainability
A
0 mins
Test Coverage
export default defineNuxtRouteMiddleware(() => {
  const { isHydrating } = useNuxtApp()
  const { neoModal } = useProgrammatic()

  const isInitialLoad = import.meta.client && isHydrating

  if (!isInitialLoad) {
    neoModal.closeAll()
  }
})