-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathimage-categories-react.jsx
More file actions
39 lines (36 loc) · 1.31 KB
/
image-categories-react.jsx
File metadata and controls
39 lines (36 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
function ShowCategories(props) {
return (
<section>
<div>
<InputFilter
type="text"
filter-selector=".image-categories li"
filter-results-selector="h1"
filter-results-text-all={i18n.text('{totalCount} Image Categories')}
filter-results-text-filtered={i18n.text('Showing {displayCount} of {totalCount} Image Categories')}
placeholder={i18n.text("Enter filter, example [dog] or [cat]")} />
</div>
<div className="content">
<h1></h1>
<ul className="image-categories">
{props.data && props.data.categories && props.data.categories.map((category, index) => {
return (
<li key={index}>{category}</li>
)
})}
</ul>
</div>
</section>
)
}
function PageCategories() {
return (
<JsonData
url="https://www.dataformsjs.com/data/ai-ml/categories/resnet50"
isLoading={<ShowLoading />}
hasError={<ShowError />}
isLoaded={<ShowCategories />}
loadOnlyOnce={true}>
</JsonData>
);
}