kodadot/nft-gallery

View on GitHub
plugins/loader.ts

Summary

Maintainability
A
0 mins
Test Coverage
const useLoader = () => useState<boolean>('loader', () => false)

export default defineNuxtPlugin(() => {
  const loader = useLoader()

  return {
    provide: {
      loader,
      updateLoader(value: boolean) {
        loader.value = value
      },
    },
  }
})