|
@@ -7,14 +7,14 @@ export default class TagsList extends React.Component {
|
|
|
super(props);
|
|
super(props);
|
|
|
|
|
|
|
|
this.state = {
|
|
this.state = {
|
|
|
- tags: [],
|
|
|
|
|
|
|
+ tagData: [],
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
async componentWillMount() {
|
|
async componentWillMount() {
|
|
|
const res = await this.props.crowi.apiGet('/tags.list');
|
|
const res = await this.props.crowi.apiGet('/tags.list');
|
|
|
this.setState({
|
|
this.setState({
|
|
|
- tags: res.tags,
|
|
|
|
|
|
|
+ tagData: res.result,
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -22,10 +22,10 @@ export default class TagsList extends React.Component {
|
|
|
return (
|
|
return (
|
|
|
<div>
|
|
<div>
|
|
|
<ul className="list-group mx-4">
|
|
<ul className="list-group mx-4">
|
|
|
- {this.state.tags.map((tag) => {
|
|
|
|
|
|
|
+ {this.state.tagData.map((data) => {
|
|
|
return (
|
|
return (
|
|
|
- <a href={`/_search?q=tag:${tag}`} className="list-group-item list-group-item-action d-flex justify-content-between align-items-center">
|
|
|
|
|
- <p className="float-left my-0">{tag}</p>
|
|
|
|
|
|
|
+ <a key={data.tagName} href={`/_search?q=tag:${data.tagName}`} className="list-group-item list-group-item-action d-flex justify-content-between align-items-center">
|
|
|
|
|
+ <p className="float-left my-0">{data.tagNeme}</p>
|
|
|
</a>
|
|
</a>
|
|
|
);
|
|
);
|
|
|
})}
|
|
})}
|