Skip to content

Commit

Permalink
⚡ useRMRKVersion is usable
Browse files Browse the repository at this point in the history
  • Loading branch information
vikiival committed Apr 13, 2023
1 parent fb3dab0 commit a3f5058
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion composables/useRmrkVersion.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
import { RemarkVersion } from '@kodadot1/minimark/shared'

export default function () {
const version = '1.0.0'
const { urlPrefix } = usePrefix()

const version = computed<RemarkVersion | null>(() => {
switch (urlPrefix.value) {
case 'rmrk':
return '1.0.0'
case 'ksm':
return '2.0.0'
default:
return null
}
})

const isRemark = computed<boolean>(() => version.value !== null)
const isV2 = computed<boolean>(() => version.value === '2.0.0')

return {
isRemark,
isV2,
version,
}
}

0 comments on commit a3f5058

Please sign in to comment.