continue flow integartion
This commit is contained in:
@@ -7,8 +7,11 @@ import { FONT_FAMILY } from "../../styles/Fonts";
|
||||
import CustomInput from "./components/CustomInput";
|
||||
import ItemContainer from "../../components/ItemContainer/ItemContainer";
|
||||
|
||||
const Goals = () => {
|
||||
const [selected, setSelected] = useState(null);
|
||||
const Goals = ({ selected: selectedProp, setSelected: setSelectedProp, otherObjective, setOtherObjective }) => {
|
||||
const [internalSelected, setInternalSelected] = useState(null);
|
||||
|
||||
const selected = selectedProp ?? internalSelected;
|
||||
const setSelected = setSelectedProp ?? setInternalSelected;
|
||||
|
||||
const onPressSelect = (item) => {
|
||||
if (selected === item) {
|
||||
@@ -60,6 +63,8 @@ const Goals = () => {
|
||||
<CustomInput
|
||||
label="Tu as un autre objectif?"
|
||||
placeholder="Décrire l’objectif"
|
||||
value={otherObjective}
|
||||
setValue={setOtherObjective}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user