Skip to content

Commit 439b808

Browse files
committed
render “crates-list” -> {{crates-list component
* clear API * render will go away in 2.0 * more re-usable (less side-effects)
1 parent 00c73bc commit 439b808

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<ul>
2+
{{#each crates as |crate|}}
3+
<li>
4+
{{#link-to 'crate' crate class='name'}}
5+
{{ crate.name }} ({{ crate.max_version }})
6+
<img src="/assets/right-arrow.png"/>
7+
{{/link-to}}
8+
</li>
9+
{{/each}}
10+
</ul>

app/templates/crate-list.hbs

-10
This file was deleted.

app/templates/index.hbs

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@
3838
<div id='home-crates' class='crate-lists'>
3939
<div id='new-crates'>
4040
<h2>New Crates</h2>
41-
{{render "crate-list" new_crates}}
41+
{{crate-list crates=new_crates}}
4242
</div>
4343
<div id='most-downloaded'>
4444
<h2>Most Downloaded</h2>
45-
{{render "crate-list" most_downloaded}}
45+
{{crate-list crates=most_downloaded}}
4646
</div>
4747
<div id='just-updated'>
4848
<h2>Just Updated</h2>
49-
{{render "crate-list" just_updated}}
49+
{{crate-list crates=just_updated}}
5050
</div>
5151
</div>

0 commit comments

Comments
 (0)