Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: rename useToast() #11230

Merged
merged 2 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/buy/Buy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const { urlPrefix } = usePrefix()
const shoppingCartStore = useShoppingCartStore()
const preferencesStore = usePreferencesStore()
const fiatStore = useFiatStore()
const { toast } = useToast()
const { toast } = useToastOruga()
const { $i18n } = useNuxtApp()

const { isTransactionSuccessful } = useTransactionSuccessful({
Expand Down
2 changes: 1 addition & 1 deletion components/codeChecker/issueHint/CodeBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const nw = new Normalizer({
})

const props = defineProps<{ code: string, lang: string }>()
const { toast } = useToast()
const { toast } = useToastOruga()
const normalizedCode = computed(() => nw.normalize(props.code))
const highlightedCode = computed(() => {
const html = Prism.highlight(
Expand Down
2 changes: 1 addition & 1 deletion components/collection/CollectionHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import CollectionBanner from '@/components/collection/CollectionHeader/Collectio

const collectionInfo = ref()

const { toast } = useToast()
const { toast } = useToastOruga()
const { $i18n } = useNuxtApp()
const route = useRoute()
const collectionId = computed(() => route.params.id.toString())
Expand Down
2 changes: 1 addition & 1 deletion components/collection/HeroButtonRefreshMetadata.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { NeoDropdownItem } from '@kodadot1/brick'
import { refreshOdaCollectionTokensMetadata } from '@/services/oda'

const route = useRoute()
const { toast } = useToast()
const { toast } = useToastOruga()
const { urlPrefix } = usePrefix()
const { $i18n } = useNuxtApp()

Expand Down
2 changes: 1 addition & 1 deletion components/collection/HeroButtons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ const route = useRoute()
const { isCurrentOwner } = useAuth()
const { urlPrefix } = usePrefix()
const { $i18n } = useNuxtApp()
const { toast } = useToast()
const { toast } = useToastOruga()
const { shareOnX, shareCollectionOnFarcaster } = useSocialShare()

const collectionId = computed(() => route.params.id.toString())
Expand Down
2 changes: 1 addition & 1 deletion components/collection/drop/HolderOfGenerative.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ import useAutoTeleportModal from '@/composables/autoTeleport/useAutoTeleportModa

const { $i18n, $consola } = useNuxtApp()
const { urlPrefix } = usePrefix()
const { toast } = useToast()
const { toast } = useToastOruga()
const { isLogIn } = useAuth()
const { doAfterLogin } = useDoAfterlogin()
const {
Expand Down
2 changes: 1 addition & 1 deletion components/collection/drop/PaidGenerative.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { doAfterCheckCurrentChainVM } from '@/components/common/ConnectWallet/op
const { urlPrefix } = usePrefix()
const { doAfterLogin } = useDoAfterlogin()
const { $i18n, $consola } = useNuxtApp()
const { toast } = useToast()
const { toast } = useToastOruga()
const { isLogIn } = useAuth()
const { openListingCartModal } = useListingCartModal({
clearItemsOnBeforeUnmount: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const props = defineProps<{
}>()

const { $i18n } = useNuxtApp()
const { toast } = useToast()
const { toast } = useToastOruga()
const { urlPrefix } = usePrefix()
const { accountId } = useAuth()
const { getCollectionFrameUrl } = useSocialShare()
Expand Down
2 changes: 1 addition & 1 deletion components/common/ConnectWallet/ConnectSubstrate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ import {

const emits = defineEmits(['select'])

const { toast } = useToast()
const { toast } = useToastOruga()

const forceWalletSelect = ref(false)
const wallets = ref<BaseDotsamaWallet[]>([])
Expand Down
2 changes: 1 addition & 1 deletion components/common/ConnectWallet/WalletAssetIdentity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import { NeoIcon } from '@kodadot1/brick'
import { useIdentityStore } from '@/stores/identity'

const { toast } = useToast()
const { toast } = useToastOruga()
const { neoModal } = useProgrammatic()
const { getPrefixByAddress } = useAddress()
const identityStore = useIdentityStore()
Expand Down
2 changes: 1 addition & 1 deletion components/common/ShareDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const props = withDefaults(

const route = useRoute()
const { $i18n } = useNuxtApp()
const { toast } = useToast()
const { toast } = useToastOruga()
const { isMobile } = useViewport()
const { shareOnX } = useSocialShare()
const propsSharingContent = computed(() => props.sharingContent)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const props = withDefaults(
},
)

const { toast } = useToast()
const { toast } = useToastOruga()
const { shareOnX, shareOnTelegram, shareOnFarcaster } = useSocialShare()

const handleShareOnX = () => {
Expand Down
2 changes: 1 addition & 1 deletion components/common/successfulModal/TransactionSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const props = defineProps<{
status: TransactionStatus
}>()

const { toast } = useToast()
const { toast } = useToastOruga()
const { getTransactionUrl } = useExplorer()
const { urlPrefix } = usePrefix()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ import type { NFT } from '@/types'
import type { Abi } from '@/composables/transaction/types'

const { $i18n, $consola } = useNuxtApp()
const { toast } = useToast()
const { toast } = useToastOruga()
const { accountId } = useAuth()
const { transaction, isLoading, status } = useTransaction()
const { listNftByNftWithMetadata } = useListingCartModal()
Expand Down
2 changes: 1 addition & 1 deletion components/identity/module/IdentityLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const props = defineProps<{
address?: Address
showClipboard?: boolean
}>()
const { toast } = useToast()
const { toast } = useToastOruga()
const { urlPrefix } = usePrefix()

const explorerLink = computed(() =>
Expand Down
2 changes: 1 addition & 1 deletion components/identity/module/IdentityPopoverHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ const shortenedAddress = inject('shortenedAddress') as string

const identity = inject<{ [x: string]: string }>('identity')
const { urlPrefix } = usePrefix()
const { toast } = useToast()
const { toast } = useToastOruga()
const { accountId } = useAuth()
</script>
2 changes: 1 addition & 1 deletion components/profile/FollowButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const { $i18n } = useNuxtApp()
const { accountId } = useAuth()
const { getSignaturePair } = useVerifyAccount()
const isHovered = useElementHover(buttonRef)
const { toast } = useToast()
const { toast } = useToastOruga()
const { doAfterLogin } = useDoAfterlogin()

const emit = defineEmits(['follow:success', 'follow:fail', 'unfollow:success'])
Expand Down
2 changes: 1 addition & 1 deletion components/profile/ProfileDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ const socials = {

const route = useRoute()
const { $i18n } = useNuxtApp()
const { toast } = useToast()
const { toast } = useToastOruga()
const { replaceUrl } = useReplaceUrl()
const { accountId, isCurrentOwner } = useAuth()
const { urlPrefix, client, setUrlPrefix } = usePrefix()
Expand Down
2 changes: 1 addition & 1 deletion components/profile/follow/UserRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import shortAddress from '@/utils/shortAddress'
const { accountId } = useAuth()
const { $i18n } = useNuxtApp()
const { doAfterLogin } = useDoAfterlogin()
const { toast } = useToast()
const { toast } = useToastOruga()
const { getSignaturePair } = useVerifyAccount()

const props = defineProps<{
Expand Down
2 changes: 1 addition & 1 deletion components/shared/TransactionLoader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const emit = defineEmits(['close', 'update:modelValue'])
const { $i18n } = useNuxtApp()
const { urlPrefix } = usePrefix()
const { estimatedTimes } = useBlockTime()
const { toast } = useToast()
const { toast } = useToastOruga()

const estimatedTimeLeft = computed(
() => estimatedTimes.value[props.status] || 'few',
Expand Down
2 changes: 1 addition & 1 deletion components/transfer/Transfer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ const { getBalance } = useBalance()
const { fetchFiatPrice, getCurrentTokenValue } = useFiatStore()
const { initTransactionLoader, isLoading, resolveStatus, status }
= useTransactionStatus()
const { toast } = useToast()
const { toast } = useToastOruga()
const { getTokenIconBySymbol } = useIcon()
const { tokens } = useToken()
const { chainExistentialDeposit } = useExistentialDeposit()
Expand Down
2 changes: 1 addition & 1 deletion composables/useToast.ts → composables/useToastOruga.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// vue composables api for toast message function
export default function useToast() {
export default function useToastOruga() {
const { neoNotification } = useProgrammatic()

// toast message function
Expand Down
2 changes: 1 addition & 1 deletion utils/copyToClipboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export function copyToClipboard(
},
) {
const { copy } = useClipboard({ legacy: true })
const { toast } = useToast()
const { toast } = useToastOruga()

// Set default values for options
const { toast: shouldToast = true, toastMessage = 'Copied to clipboard' }
Expand Down
Loading