Skip to content

Commit

Permalink
chore: Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
samuveth committed Nov 17, 2023
1 parent 4c464c8 commit 5a85d1e
Show file tree
Hide file tree
Showing 17 changed files with 65 additions and 41 deletions.
5 changes: 2 additions & 3 deletions src/components/AvatarToken.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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`
"
/>
</template>
4 changes: 2 additions & 2 deletions src/components/ButtonFollow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ watch(
loadingFollow !== ''
? null
: canFollow
? clickFollow(space.id)
: (modalTermsOpen = true)
? clickFollow(space.id)
: (modalTermsOpen = true)
"
>
<span v-if="!isFollowing"> {{ $t('join') }} </span>
Expand Down
7 changes: 6 additions & 1 deletion src/components/SettingsProfileBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ const avatarNotReactive = ref(form.value.avatar);
<AvatarSpace
:preview-file="previewFile"
size="80"
:space="{ id: $route.params.ens as string ?? $route.params.key as string, avatar: avatarNotReactive }"
:space="{
id:
($route.params.ens as string) ??
($route.params.key as string),
avatar: avatarNotReactive
}"
/>
<AvatarOverlayEdit
:loading="uploading"
Expand Down
4 changes: 2 additions & 2 deletions src/components/SidebarUnreadIndicator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ defineProps<{ space: string; hasUnseen: boolean }>();
$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"
/>
Expand Down
8 changes: 7 additions & 1 deletion src/components/SpaceCreateContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
"
/>

<span class="pointer-events-none relative pl-1 text-sm">
Expand Down
4 changes: 2 additions & 2 deletions src/components/SpaceProposalPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
8 changes: 4 additions & 4 deletions src/components/SpaceProposalVote.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
<SpaceProposalVoteApproval
v-if="proposal.type === 'approval'"
:key="key"
:proposal="proposal"
:user-choice="(validatedUserChoice as number[])"
:user-choice="validatedUserChoice as number[]"
@selectChoice="emitChoice"
/>
<SpaceProposalVoteQuadratic
v-if="proposal.type === 'quadratic' || proposal.type === 'weighted'"
:key="key"
:proposal="proposal"
:user-choice="(validatedUserChoice as Record<string, number>)"
:user-choice="validatedUserChoice as Record<string, number>"
@selectChoice="emitChoice"
/>
<SpaceProposalVoteRankedChoice
v-if="proposal.type === 'ranked-choice'"
:key="key"
:proposal="proposal"
:user-choice="(validatedUserChoice as number[])"
:user-choice="validatedUserChoice as number[]"
@selectChoice="emitChoice"
/>
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/components/StrategiesListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
>
<span v-text="shorten(param as string)" />
Expand Down
11 changes: 7 additions & 4 deletions src/composables/useEmailSubscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<SubscriptionType, boolean>);
return subscriptionTypes.reduce(
(acc, type) => {
acc[type] = apiSubscriptions.value.includes(type);
return acc;
},
{} as Record<SubscriptionType, boolean>
);
},
set(value) {
apiSubscriptions.value = Object.entries(value)
Expand Down
4 changes: 2 additions & 2 deletions src/composables/useNetworksFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export function useNetworksFilter() {
a.name.toLowerCase().includes('testnet')
? 1
: b.name.toLowerCase().includes('testnet')
? -1
: 0
? -1
: 0
);

return networksArrayTestnetworksLast;
Expand Down
11 changes: 7 additions & 4 deletions src/composables/useStatement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, Statement>);
const newStatements = response.reduce(
(acc, statement) => {
acc[statement.delegate.toLowerCase()] = statement;
return acc;
},
{} as Record<string, Statement>
);
statements.value = { ...statements.value, ...newStatements };
} catch (e) {
console.error(e);
Expand Down
12 changes: 8 additions & 4 deletions src/composables/useTreasury.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions src/helpers/lensResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,8 @@ class LensResolver {
async resolveAddresses(
addresses: Address[]
): Promise<Record<Address, Handle>> {
const addressesWithHandles = await this.getAvailableHandleMapping(
addresses
);
const addressesWithHandles =
await this.getAvailableHandleMapping(addresses);
const tokenMapping = await this.getTokensMapping(addressesWithHandles);
return this.getHandleMapping(tokenMapping);
}
Expand Down
5 changes: 4 additions & 1 deletion src/plugins/progress/components/CustomBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/safeSnap/utils/umaModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/views/PlaygroundView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
/>
Expand Down Expand Up @@ -235,7 +235,7 @@ function handleNetworkSelect(value) {
<FormObjectStrategyParams
v-if="strategyDefinition"
v-model="form.params"
:strategy-name="(route.params.name as string)"
:strategy-name="route.params.name as string"
/>
<TextareaJson
v-else
Expand Down Expand Up @@ -292,7 +292,7 @@ function handleNetworkSelect(value) {
:key="address"
class="flex justify-between"
>
<BaseUser :address="(address as string)" />
<BaseUser :address="address as string" />
<span>
{{ formatCompactNumber(score) }}
{{ form.params.symbol }}
Expand Down
4 changes: 2 additions & 2 deletions src/views/SpaceView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 } =
Expand Down

1 comment on commit 5a85d1e

@vercel
Copy link

@vercel vercel bot commented on 5a85d1e Nov 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.