...
 
Commits (2)
import React from "react";
import { Image, Segment, Item, Button } from "semantic-ui-react";
import { Image, Segment, Item, Button, Container } from "semantic-ui-react";
import DisplayName from "user/display-name";
import { backend_url, add_auth } from "utils";
......@@ -40,37 +40,39 @@ export default class FollowRequests extends React.Component {
render() {
return (
<Item.Group>
{ this.state.requests.length == 0 && (
<Segment inverted>
<Item content="Nothing :(" />
</Segment>
)}
{ this.state.requests.map(request => (
<Segment inverted>
<Item key={request.id}>
<Item.Header>
<h5>
<Image src={request.avatar}
circular width="40px" height="40px" inline
verticalAlign="middle" spaced={true} />
<DisplayName user={request} />
</h5>
</Item.Header>
<Item.Content>
<Button.Group color="black">
<Button content="Accept" icon="check"
onClick={() => this.acceptRequest(request.id)}
/>
<Button content="Reject" icon="delete"
onClick={() => this.rejectRequest(request.id)}
/>
</Button.Group>
</Item.Content>
</Item>
</Segment>
))}
</Item.Group>
<Container>
<Item.Group>
{ this.state.requests.length == 0 && (
<Segment inverted>
<Item content="Nothing :(" />
</Segment>
)}
{ this.state.requests.map(request => (
<Segment inverted key={request.id}>
<Item>
<Item.Header>
<h5>
<Image src={request.avatar}
circular width="40px" height="40px" inline
verticalAlign="middle" spaced={true} />
<DisplayName user={request} />
</h5>
</Item.Header>
<Item.Content>
<Button.Group color="black">
<Button content="Accept" icon="check"
onClick={() => this.acceptRequest(request.id)}
/>
<Button content="Reject" icon="delete"
onClick={() => this.rejectRequest(request.id)}
/>
</Button.Group>
</Item.Content>
</Item>
</Segment>
))}
</Item.Group>
</Container>
);
}
}