Skip to content

Commit

Permalink
chore: add search
Browse files Browse the repository at this point in the history
  • Loading branch information
MishaZhem committed Jul 29, 2024
1 parent 710e4ae commit 1b8c2ae
Showing 1 changed file with 38 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,35 +39,45 @@
tuiScrollable
class="viewport tui-zero-scrollbar"
>
<div
*cdkVirtualFor="let i of lengthPools(data.length)"
tuiCell="m"
[style.padding-left]="'1rem'"
[style.padding-right]="'1rem'"
>
<tui-avatar-stack
class="tui-space_vertical-4"
[direction]="'right'"
<div *cdkVirtualFor="let i of lengthPools(data.length)">
<div
*ngIf="
(data[i].symbol.toUpperCase() + '/' + data[i + 1].symbol.toUpperCase()).includes(
search.toUpperCase()
)
"
tuiCell="m"
[style.padding-left]="'1rem'"
[style.padding-right]="'1rem'"
>
<tui-avatar
size="m"
[src]="
'https://assets.coincap.io/assets/icons/' + data[i].symbol.toLowerCase() + '@2x.png'
"
/>
<tui-avatar
size="m"
[src]="
'https://assets.coincap.io/assets/icons/' +
data[i + 1].symbol.toLowerCase() +
'@2x.png'
"
/>
</tui-avatar-stack>
<div TuiTitle>{{ data[i].symbol.toUpperCase() }}/{{ data[i + 1].symbol.toUpperCase() }}</div>
<div class="last-columns">
<div TuiTitle>${{ getTVL(data, i) }}M</div>
<div TuiTitle>{{ getAPR(data, i) }}%</div>
<tui-avatar-stack
class="tui-space_vertical-4"
[direction]="'right'"
>
<tui-avatar
size="m"
[src]="
'https://assets.coincap.io/assets/icons/' +
data[i].symbol.toLowerCase() +
'@2x.png'
"
/>
<tui-avatar
size="m"
[src]="
'https://assets.coincap.io/assets/icons/' +
data[i + 1].symbol.toLowerCase() +
'@2x.png'
"
/>
</tui-avatar-stack>
<div TuiTitle>
{{ data[i].symbol.toUpperCase() }}/{{ data[i + 1].symbol.toUpperCase() }}
</div>
<div class="last-columns">
<div TuiTitle>${{ getTVL(data, i) }}M</div>
<div TuiTitle>{{ getAPR(data, i) }}%</div>
</div>
</div>
</div>
</cdk-virtual-scroll-viewport>
Expand Down

0 comments on commit 1b8c2ae

Please sign in to comment.