From 5a85d1e0da9fb3cc657de3a84bbf1b2d6a940c11 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 17 Nov 2023 14:53:47 +0700 Subject: [PATCH] chore: Fix format --- src/components/AvatarToken.vue | 5 ++--- src/components/ButtonFollow.vue | 4 ++-- src/components/SettingsProfileBlock.vue | 7 ++++++- src/components/SidebarUnreadIndicator.vue | 4 ++-- src/components/SpaceCreateContent.vue | 8 +++++++- src/components/SpaceProposalPage.vue | 4 ++-- src/components/SpaceProposalVote.vue | 8 ++++---- src/components/StrategiesListItem.vue | 4 +++- src/composables/useEmailSubscription.ts | 11 +++++++---- src/composables/useNetworksFilter.ts | 4 ++-- src/composables/useStatement.ts | 11 +++++++---- src/composables/useTreasury.ts | 12 ++++++++---- src/helpers/lensResolver.ts | 5 ++--- src/plugins/progress/components/CustomBlock.vue | 5 ++++- src/plugins/safeSnap/utils/umaModule.ts | 4 ++-- src/views/PlaygroundView.vue | 6 +++--- src/views/SpaceView.vue | 4 ++-- 17 files changed, 65 insertions(+), 41 deletions(-) diff --git a/src/components/AvatarToken.vue b/src/components/AvatarToken.vue index 155dc9d193fc..43d0f296dbf5 100644 --- a/src/components/AvatarToken.vue +++ b/src/components/AvatarToken.vue @@ -21,9 +21,8 @@ withDefaults( }" alt="Token logo" @error=" - ( - $event.target as HTMLImageElement - ).src = `https://cdn.stamp.fyi/token/eth:${address}?s=100` + ($event.target as HTMLImageElement).src = + `https://cdn.stamp.fyi/token/eth:${address}?s=100` " /> diff --git a/src/components/ButtonFollow.vue b/src/components/ButtonFollow.vue index c71b35759834..850c5f83ec34 100644 --- a/src/components/ButtonFollow.vue +++ b/src/components/ButtonFollow.vue @@ -49,8 +49,8 @@ watch( loadingFollow !== '' ? null : canFollow - ? clickFollow(space.id) - : (modalTermsOpen = true) + ? clickFollow(space.id) + : (modalTermsOpen = true) " > {{ $t('join') }} diff --git a/src/components/SettingsProfileBlock.vue b/src/components/SettingsProfileBlock.vue index 0197837424c2..b8918a6321a9 100644 --- a/src/components/SettingsProfileBlock.vue +++ b/src/components/SettingsProfileBlock.vue @@ -34,7 +34,12 @@ const avatarNotReactive = ref(form.value.avatar); (); $route.params.key === space ? '!h-[20px] bg-skin-link' : hasUnseen - ? 'bg-skin-text group-hover:h-[10px]' - : 'group-hover:h-[10px] ' + ? 'bg-skin-text group-hover:h-[10px]' + : 'group-hover:h-[10px] ' ]" class="absolute left-[-4px] h-[8px] w-[8px] rounded-full transition-all duration-300 group-hover:bg-skin-link" /> diff --git a/src/components/SpaceCreateContent.vue b/src/components/SpaceCreateContent.vue index 28f27d7b406a..c2fff58b9af6 100644 --- a/src/components/SpaceCreateContent.vue +++ b/src/components/SpaceCreateContent.vue @@ -124,7 +124,13 @@ const handleDrop = e => { accept="image/jpg, image/jpeg, image/png" type="file" class="absolute bottom-0 left-0 right-0 top-0 ml-0 w-full p-[5px] opacity-0" - @change="e => upload((e.target as HTMLInputElement)?.files?.[0], injectImageToBody)" + @change=" + e => + upload( + (e.target as HTMLInputElement)?.files?.[0], + injectImageToBody + ) + " /> diff --git a/src/components/SpaceProposalPage.vue b/src/components/SpaceProposalPage.vue index cc892810d8c3..5df3ab9ad02b 100644 --- a/src/components/SpaceProposalPage.vue +++ b/src/components/SpaceProposalPage.vue @@ -63,8 +63,8 @@ function clickVote() { !web3.value.account ? (modalAccountOpen.value = true) : !termsAccepted.value && props.space.terms - ? (modalTermsOpen.value = true) - : (modalOpen.value = true); + ? (modalTermsOpen.value = true) + : (modalOpen.value = true); } function reloadProposal() { diff --git a/src/components/SpaceProposalVote.vue b/src/components/SpaceProposalVote.vue index b6e07308d17e..55d2ae8e9f82 100644 --- a/src/components/SpaceProposalVote.vue +++ b/src/components/SpaceProposalVote.vue @@ -52,28 +52,28 @@ watch(validatedUserChoice, () => { v-if="proposal.type === 'single-choice' || proposal.type === 'basic'" :key="key" :proposal="proposal" - :user-choice="(validatedUserChoice as number)" + :user-choice="validatedUserChoice as number" @selectChoice="emitChoice" /> diff --git a/src/components/StrategiesListItem.vue b/src/components/StrategiesListItem.vue index ff8b0925fb77..c3c018c58da5 100644 --- a/src/components/StrategiesListItem.vue +++ b/src/components/StrategiesListItem.vue @@ -72,7 +72,9 @@ function openStrategy() { v-if=" key === 'address' || (typeof param === 'string' && isAddress(param)) " - :link="explorerUrl(strategy.network || proposal?.network, param as string)" + :link=" + explorerUrl(strategy.network || proposal?.network, param as string) + " class="block" > diff --git a/src/composables/useEmailSubscription.ts b/src/composables/useEmailSubscription.ts index eef124b7cb00..171a1a3c6637 100644 --- a/src/composables/useEmailSubscription.ts +++ b/src/composables/useEmailSubscription.ts @@ -19,10 +19,13 @@ function useEmailSubscriptionComposable() { const clientSubscriptions = computed({ get() { - return subscriptionTypes.reduce((acc, type) => { - acc[type] = apiSubscriptions.value.includes(type); - return acc; - }, {} as Record); + return subscriptionTypes.reduce( + (acc, type) => { + acc[type] = apiSubscriptions.value.includes(type); + return acc; + }, + {} as Record + ); }, set(value) { apiSubscriptions.value = Object.entries(value) diff --git a/src/composables/useNetworksFilter.ts b/src/composables/useNetworksFilter.ts index 8b8dfa96d3e8..664bcefa0d30 100644 --- a/src/composables/useNetworksFilter.ts +++ b/src/composables/useNetworksFilter.ts @@ -35,8 +35,8 @@ export function useNetworksFilter() { a.name.toLowerCase().includes('testnet') ? 1 : b.name.toLowerCase().includes('testnet') - ? -1 - : 0 + ? -1 + : 0 ); return networksArrayTestnetworksLast; diff --git a/src/composables/useStatement.ts b/src/composables/useStatement.ts index 1b32762c1126..24b46a2e1426 100644 --- a/src/composables/useStatement.ts +++ b/src/composables/useStatement.ts @@ -57,10 +57,13 @@ export function useStatement() { if (!response) throw new Error('No statements found'); - const newStatements = response.reduce((acc, statement) => { - acc[statement.delegate.toLowerCase()] = statement; - return acc; - }, {} as Record); + const newStatements = response.reduce( + (acc, statement) => { + acc[statement.delegate.toLowerCase()] = statement; + return acc; + }, + {} as Record + ); statements.value = { ...statements.value, ...newStatements }; } catch (e) { console.error(e); diff --git a/src/composables/useTreasury.ts b/src/composables/useTreasury.ts index dde25bc1a234..def4f472c4aa 100644 --- a/src/composables/useTreasury.ts +++ b/src/composables/useTreasury.ts @@ -28,10 +28,14 @@ export function useTreasury() { if (treasuryAssets.value[address]) return; const balances = await getTokenBalances(address, chainId) - .then(balances => - balances?.filter(balance => - tokenListContractAddresses.value?.includes(balance.contract_address) - ) + .then( + balances => + balances?.filter( + balance => + tokenListContractAddresses.value?.includes( + balance.contract_address + ) + ) ) .catch(() => []); if (balances) treasuryAssets.value[address] = balances; diff --git a/src/helpers/lensResolver.ts b/src/helpers/lensResolver.ts index 65d47d5c6032..57ec415d51c7 100644 --- a/src/helpers/lensResolver.ts +++ b/src/helpers/lensResolver.ts @@ -83,9 +83,8 @@ class LensResolver { async resolveAddresses( addresses: Address[] ): Promise> { - const addressesWithHandles = await this.getAvailableHandleMapping( - addresses - ); + const addressesWithHandles = + await this.getAvailableHandleMapping(addresses); const tokenMapping = await this.getTokensMapping(addressesWithHandles); return this.getHandleMapping(tokenMapping); } diff --git a/src/plugins/progress/components/CustomBlock.vue b/src/plugins/progress/components/CustomBlock.vue index 8296d58fcbe4..082249fd09b3 100644 --- a/src/plugins/progress/components/CustomBlock.vue +++ b/src/plugins/progress/components/CustomBlock.vue @@ -518,7 +518,10 @@ a.button { width: 10px; height: 12px; border: 2px solid transparent; - box-shadow: 0 0 0 2px, inset -2px 0 0, inset 2px 0 0; + box-shadow: + 0 0 0 2px, + inset -2px 0 0, + inset 2px 0 0; border-bottom-left-radius: 1px; border-bottom-right-radius: 1px; margin-top: 4px; diff --git a/src/plugins/safeSnap/utils/umaModule.ts b/src/plugins/safeSnap/utils/umaModule.ts index 181509d223b8..f9219964cbe8 100644 --- a/src/plugins/safeSnap/utils/umaModule.ts +++ b/src/plugins/safeSnap/utils/umaModule.ts @@ -104,8 +104,8 @@ const findProposalGql = async ( const request = ` { proposals(where:{proposalHash:"${params.proposalHash}",explanation:"${ - params.explanation - }",optimisticGovernor:"${params.ogAddress.toLowerCase()}"}){ + params.explanation + }",optimisticGovernor:"${params.ogAddress.toLowerCase()}"}){ id executed assertionId diff --git a/src/views/PlaygroundView.vue b/src/views/PlaygroundView.vue index 924dad88228c..60ba3163d8b1 100644 --- a/src/views/PlaygroundView.vue +++ b/src/views/PlaygroundView.vue @@ -203,7 +203,7 @@ function handleNetworkSelect(value) { :items=" filterStrategies(searchInput).map(s => ({ id: s.id, name: s.id })) " - :selected-id="(route.params.name as string)" + :selected-id="route.params.name as string" @select="selectStrategy" @search="value => (searchInput = value)" /> @@ -235,7 +235,7 @@ function handleNetworkSelect(value) { - + {{ formatCompactNumber(score) }} {{ form.params.symbol }} diff --git a/src/views/SpaceView.vue b/src/views/SpaceView.vue index 4fe674d2315a..d000209636e3 100644 --- a/src/views/SpaceView.vue +++ b/src/views/SpaceView.vue @@ -15,8 +15,8 @@ const spaceKey = computed( () => aliasedSpace.value || domain || route.params.key ); -const space = computed(() => - extendedSpaces.value?.find(s => s.id === spaceKey.value.toLowerCase()) +const space = computed( + () => extendedSpaces.value?.find(s => s.id === spaceKey.value.toLowerCase()) ); const { isMessageVisible, setMessageVisibility } =