This is my constructor where my variable is, all i want is to pass this variable in HorizontalLinearStepper...
export class Dashboard extends React.Component {
constructor(props) {
super(props);
this.state = {
area: null,
};
}
I succesfyllu get the value and set it to this.state.area
var Area = L.GeometryUtil.geodesicArea(layer.getLatLngs()[0]);
var area1 = L.GeometryUtil.formattedNumber(Area * 0.001) + " m²";
console.log(area1);
this.setState({
area: area1,
});
This is how on step 1 i give my component Dashboard
case 1:
return (
<div style={{ padding: "2% 0" }}>
<Typography variant="h4">Find your land on the map</Typography>
<AlertNoPoly errorStatusPolly={errorStatusPolly} />
<ul>
<li>
Find your land on the map and mark it using the map tools.
</li>
<li>Or upload a digital file of your land</li>
</ul>
<Dashboard viewMap={viewMap} area={area} />
</div>
);
Now my problems is that from the stepper to Dashboard no problems to pass a variable with its value but how to make from Dashboard to stepper to pass variable?