Show gang switch
This commit is contained in:
@@ -10,6 +10,8 @@ const NewHomieForm = (props) => {
|
||||
const [homieImportance, setHomieImportance] = useState("");
|
||||
const [busy, setBusy] = useState(false);
|
||||
|
||||
const gang = props.gang;
|
||||
|
||||
const disableAddButton = () => {
|
||||
return homieName.length === 0 ||
|
||||
homieImportance === "" ||
|
||||
@@ -33,7 +35,8 @@ const NewHomieForm = (props) => {
|
||||
homie: {
|
||||
name: homieName,
|
||||
about: aboutHomie,
|
||||
importance: parseInt(homieImportance)
|
||||
importance: parseInt(homieImportance),
|
||||
gang_id: gang.id
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +60,7 @@ const NewHomieForm = (props) => {
|
||||
return (
|
||||
<div>
|
||||
<Collapsible id="new-homie-form-container">
|
||||
<CollapsibleItem header={<strong>Introduce new homie to the Hood</strong>}>
|
||||
<CollapsibleItem header={<strong>{`Introduce new homie to the ${gang.name} gang`}</strong>}>
|
||||
<div className="input-field col s12">
|
||||
<input id="homie-name" type="text" className="validate" required="required" value={homieName} onChange={(e) => setHomieName(e.target.value)} />
|
||||
<label className="required" htmlFor="homie-name">Homie name</label>
|
||||
|
||||
Reference in New Issue
Block a user