Skip to content

Commit

Permalink
Display unstoppable grants category in staking v2 (#1173)
Browse files Browse the repository at this point in the history
* Display unstoppable grants category

* Small styling fix

* Name tag ellipsis
  • Loading branch information
bobo-k2 authored Feb 8, 2024
1 parent 1d62c2b commit c4a209a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/components/dapp-staking/StakingTop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<dapp-list category="Tooling" />
<dapp-list category="Utility" />
<dapp-list category="Others" />
<dapp-list category="unstoppable-grants" />
</div>

<Teleport to="#staking-top-bg">
Expand Down
10 changes: 8 additions & 2 deletions src/components/dapp-staking/my-staking/DappList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<div v-if="dapps && dapps.length > 0" class="wrapper">
<div class="divider" />
<div class="wrapper--header">
<div class="txt--header">{{ category }}</div>
<div class="txt--header">{{ categoryName }}</div>
</div>
<card-list :category="category" :dapps="dapps" />
<card-list :category="categoryName" :dapps="dapps" />
</div>
</template>
<script lang="ts">
Expand All @@ -27,8 +27,14 @@ export default defineComponent({
return dappsArray.filter((it: DappCombinedInfo) => it.dapp);
});
const categoryName = computed<string>(() => {
const name = props.category.replace(/-/g, ' ');
return name.charAt(0).toUpperCase() + name.slice(1);
});
return {
dapps,
categoryName,
};
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export default defineComponent({
}
.badge--tag {
width: 54px;
width: 64px;
height: 18px;
padding: 2px 8px;
background: $navy-3;
Expand All @@ -196,6 +196,8 @@ export default defineComponent({
color: #fff;
margin-top: 16px;
margin-bottom: 16px;
text-overflow: ellipsis;
overflow: hidden;
}
.divider {
Expand Down

0 comments on commit c4a209a

Please sign in to comment.