1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-09 00:18:00 +01:00

Make strategy list as links

This commit is contained in:
ivaosthu 2016-12-05 23:12:01 +01:00
parent 87cd3b03d1
commit 9bcb7bd0ad

View File

@ -1,8 +1,7 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Link } from 'react-router';
import { List, ListItem, ListItemContent, Icon, IconButton, Chip } from 'react-mdl'; import { List, ListItem, ListItemContent, IconButton, Chip } from 'react-mdl';
import style from './strategies.scss';
class StrategiesListComponent extends Component { class StrategiesListComponent extends Component {
@ -33,7 +32,11 @@ class StrategiesListComponent extends Component {
{strategies.length > 0 ? strategies.map((strategy, i) => { {strategies.length > 0 ? strategies.map((strategy, i) => {
return ( return (
<ListItem key={i}> <ListItem key={i}>
<ListItemContent><strong>{strategy.name}</strong> {strategy.description}</ListItemContent> <ListItemContent>
<Link to={`/strategies/view/${strategy.name}`}>
<strong>{strategy.name}</strong>
</Link>
<span> {strategy.description}</span></ListItemContent>
<IconButton name="delete" onClick={() => removeStrategy(strategy)} /> <IconButton name="delete" onClick={() => removeStrategy(strategy)} />
</ListItem> </ListItem>
); );