add gang details page with rename function

This commit is contained in:
Bilal
2020-10-10 01:18:25 +03:00
parent c84ba63984
commit 824790c178
4 changed files with 87 additions and 18 deletions

View File

@@ -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);