add gang details page with rename function
This commit is contained in:
@@ -5,6 +5,7 @@ import {errorToast} from "../common/errorHelpers";
|
||||
import YesNoModal from "../common/YesNoModal";
|
||||
import {Button} from "react-materialize";
|
||||
import M from "materialize-css";
|
||||
import {withRouter} from 'react-router-dom';
|
||||
|
||||
const Gangs = (props) => {
|
||||
const gangs = props.gangs;
|
||||
@@ -35,6 +36,8 @@ const Gangs = (props) => {
|
||||
<div className="grey-text">{ `${gang.about || '[no about]'} • ${gang.chip_name} (${gang.chip_code})`}</div>
|
||||
</div>
|
||||
|
||||
<Button flat className="push" icon="edit" onClick={() => props.history.push(`/gangs/${gang.id}`)} />
|
||||
|
||||
<YesNoModal
|
||||
body={"Maan, y'a sure about this?"}
|
||||
yesAction={() => deleteGang(gang.id)}
|
||||
@@ -56,4 +59,4 @@ const Gangs = (props) => {
|
||||
)
|
||||
}
|
||||
|
||||
export default Gangs;
|
||||
export default withRouter(Gangs);
|
||||
Reference in New Issue
Block a user