Skip to content

Commit

Permalink
code review #1
Browse files Browse the repository at this point in the history
  • Loading branch information
daiagi committed Jun 23, 2023
1 parent c91ab1d commit dccaaca
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
1 change: 0 additions & 1 deletion components/rmrk/Create/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
</template>

<script lang="ts" setup>
import { defineEmits } from 'vue'
import CreateCollection from './CreateCollection.vue'
const emit = defineEmits(['navigateToCreateNftTab'])
Expand Down
9 changes: 5 additions & 4 deletions components/rmrk/Create/CreateCollection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,14 @@ import BaseCollectionForm from '@/components/base/BaseCollectionForm.vue'
import BasicSwitch from '@/components/shared/form/BasicSwitch.vue'
import SubmitButton from '@/components/base/SubmitButton.vue'
import { NeoField, NeoInput } from '@kodadot1/brick'
import { BaseCollectionType } from '@/composables/transaction/types'
import useLoader from '@/composables/useLoader'
interface ComponentWithCheckValidity extends Vue {
checkValidity(): boolean
}
const base = ref({
const base = ref<BaseCollectionType>({
name: '',
file: null,
description: '',
Expand All @@ -78,9 +80,8 @@ const max = ref(1)
const unlimited = ref(true)
const collectionForm = ref<ComponentWithCheckValidity>()
const symbolInput = ref<ComponentWithCheckValidity>()
const isLoading = ref(false)
const status = ref('')
const { accountId, balance, isLogIn } = useAuth()
const { isLoading, status } = useLoader()
const emit = defineEmits(['created'])
const { $i18n } = useNuxtApp()
Expand All @@ -90,7 +91,7 @@ const checkValidity = () => {
)
}
const rmrkId = ref(generateId(accountId.value, symbol.value))
const rmrkId = computed(() => generateId(accountId.value, symbol.value))
const balanceNotEnough = computed(() => Number(balance.value) <= 2)
const balanceNotEnoughMessage = computed(() =>
Expand Down
9 changes: 9 additions & 0 deletions composables/useLoader.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export default function () {
const isLoading = ref(false)
const status = ref('')

return {
isLoading,
status,
}
}

0 comments on commit dccaaca

Please sign in to comment.